This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import elasticapm | |
from elasticapm.contrib.flask import ElasticAPM | |
from flask import Flask | |
# initialize using environment variables from elasticapm.contrib.flask import ElasticAPM | |
app = Flask(__name__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if somaxconn, err := unix.Sysctl("kern.ipc.somaxconn"); err != nil { | |
panic(err) | |
} else { | |
var backlog uint16 | |
r := strings.NewReader(somaxconn) | |
if err := binary.Read(r, binary.LittleEndian, &backlog); err != nil { | |
fmt.Println("binary.Read failed:", err) | |
} | |
fmt.Println(backlog) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gopkg.toml example | |
# | |
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md | |
# for detailed Gopkg.toml documentation. | |
# | |
# required = ["github.com/user/thing/cmd/thing"] | |
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | |
# | |
# [[constraint]] | |
# name = "github.com/user/project" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"testing" | |
) | |
var ( | |
data map[string]interface{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright 2018 Gil Raphaelli | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seccomp: | |
default_action: errno | |
syscalls: | |
- names: | |
- accept | |
- accept4 | |
- arch_prctl | |
- bind | |
- brk | |
- clone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benchmark old ns/op new ns/op delta | |
BenchmarkBackendProcessor/TestProcessErrorMinimalServiceValidate-4 6977 9455 +35.52% | |
BenchmarkBackendProcessor/TestProcessErrorMinimalServiceDecode-4 3238 3192 -1.42% | |
BenchmarkBackendProcessor/TestProcessErrorMinimalProcessValidate-4 9093 10978 +20.73% | |
BenchmarkBackendProcessor/TestProcessErrorMinimalProcessDecode-4 3766 3803 +0.98% | |
BenchmarkBackendProcessor/TestProcessErrorFullValidate-4 58480 77015 +31.69% | |
BenchmarkBackendProcessor/TestProcessErrorFullDecode-4 14368 14116 -1.75% | |
BenchmarkBackendProcessor/TestProcessErrorNullValuesValidate-4 39119 43806 +11.98% | |
BenchmarkBackendProcessor/TestProcessErrorNullValuesDecode-4 7862 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"libbeat.config.reloads": 0, | |
"libbeat.config.module.starts": 0, | |
"libbeat.config.module.stops": 0, | |
"libbeat.config.module.running": 0, | |
"libbeat.output.type": "elasticsearch", | |
"libbeat.output.events.duplicates": 0, | |
"libbeat.output.events.active": 0, | |
"libbeat.output.events.batches": 0, | |
"libbeat.output.events.total": 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apm-6.2.3": { | |
"aliases": {}, | |
"index_patterns": [ | |
"apm-6.2.3-*" | |
], | |
"mappings": { | |
"doc": { | |
"_meta": { | |
"version": "6.2.3" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import os | |
def direct_dep(pkg): | |
for d in { | |
"github.com/Bowery/prompt", | |
"github.com/apache/thrift", |