prometheus/haproxy_exporter — pull request #7 by u-c-l (2014-06-27 16:49:00+00:00)
Title: Migrate to new client_golang.

Only to be merged once the new client_golang is merged into master.

@grobie @juliusv

This is almost a rewrite because the whole code is so much more
straight forward with the new client_golang. \o/

Benchmark results (arguably, more is happening in the new version
because metrics are handed over and not only set...):

BEFORE
BenchmarkExtract 20 72246094 ns/op 22516486 B/op 252777 allocs/op
--- BENCH: BenchmarkExtract
haproxy_exporter_test.go:127: 256208 bytes used after 1 runs
haproxy_exporter_test.go:127: 284584 bytes used after 20 runs

AFTER
BenchmarkExtract 20 71213582 ns/op 15708971 B/op 312909 allocs/op
--- BENCH: BenchmarkExtract
haproxy_exporter_test.go:141: 359960 bytes used after 1 runs
haproxy_exporter_test.go:141: 3072 bytes used after 20 runs