Skip to content

Instantly share code, notes, and snippets.

View taotetek's full-sized avatar
💭
Left for Gitlab. Microsoft still contracts with ICE.

taotetek taotetek

💭
Left for Gitlab. Microsoft still contracts with ICE.
View GitHub Profile
@taotetek
taotetek / scatter_gather_results.txt
Created December 24, 2016 15:06
GoCZMQ Scatter Gather Test
BenchmarkScatterGather1k-8 1000000 1995 ns/op 513.18 MB/s
BenchmarkScatterGather4k-8 500000 3365 ns/op 1217.08 MB/s
BenchmarkScatterGather16k-8 200000 6394 ns/op 2562.20 MB/s
PASS
@taotetek
taotetek / fun.c
Created February 27, 2017 01:08
CZMQ code instrumented with Prometheus via Go shared lib.
#include <stdio.h>
#include <czmq.h>
#include "prometheuz.h"
void *sender(void *arg) {
zsock_t *sender = zsock_new_push ("inproc://demo");
while (1) {
zstr_send (sender, "hello");
}
}
action(
name="to_local_file"
type="omfile"
ziplevel="4"
template="custom_fileformat"
dynafile="custom_filename"
)
if $programname startswith 'haproxy' then {
action(
name="haproxy_tcp"
type="omfwd"
protocol="tcp"
target="someserver.digitalocean.com"
port="514"
)
action(