Skip to content

Instantly share code, notes, and snippets.

@knyar
knyar / csv.sh
Last active May 10, 2023 14:09 — forked from dolik-rce/nginx.conf
Nginx-lua-prometheus benchmark #3
#!/bin/bash
set -e -u -o pipefail
commits="1e13e22c 0.20200420 avoid-get_keys"
modes="parallel serial none"
output=results.csv
echo -n 'num_metrics' > $output
for mode in $modes; do
for commit in $commits; do
@knyar
knyar / gist:771d78f1d59cd085d6a0
Created May 31, 2014 09:20
patch-1.5.23.sidebar.20140412.txt
*** mutt-1.5.23-orig/buffy.c 2014-03-12 11:03:44.000000000 -0500
--- mutt-1.5.23/buffy.c 2014-04-12 15:33:54.000000000 -0500
***************
*** 161,166 ****
--- 161,209 ----
}
}
+ static int buffy_compare_name(const void *a, const void *b) {
+ const BUFFY *b1 = * (BUFFY * const *) a;
@knyar
knyar / statsd.lua
Created February 9, 2014 19:59
statsd interface for nginx (via ngx_lua)
-- ----------------------------------------------------------------------------
-- statsd interface for nginx
-- (c) 2014 Anton Tolchanov
-- https://gist.github.com/knyar/8905045
--
-- Usage:
-- 1. install nginx with ngx_lua;
-- 2. put this file as statsd.lua somewhere (/var/lib/nginx/lua/ will do);
-- 3. initialize stats in init_by_lua:
-- http {