bitly / statsdaemon

an implementation of Etsy's statsd in Go
The Unlicense
570 stars 131 forks source link

Benchmark tests for `process*(...)` #23

Closed JensRantil closed 10 years ago

JensRantil commented 10 years ago

I wrote a couple of benchmarks for statsdaemon and thought that they maybe could be of interest to enable people to test throughput and potential speed improvements. Let me know whether you find them useful or not.

mreiferson commented 10 years ago

these look good, thanks!

mind posting the output of the benchmark on this PR for posterity?

JensRantil commented 10 years ago

You're welcome!

mind posting the output of the benchmark on this PR for posterity?

Sure!

$ go test -bench=".*"
PASS
BenchmarkManyDifferentSensors          1    2014624926 ns/op
BenchmarkOneBigTimer           1    1958929096 ns/op
BenchmarkLotsOfTimers          1    2012189938 ns/op
ok      github.com/bitly/statsdaemon    12.082s

I've also played around with making the processing more concurrent. It's yielded a speedup, but at the cost of code readability. If you are curious, you can have a look here.

mreiferson commented 10 years ago

Thanks. Feel free to open up a separate PR for the performance improvements so we can take a look.

This PR just needs a rebase from the recent merges...

JensRantil commented 10 years ago

Thanks. Feel free to open up a separate PR for the performance improvements so we can take a look.

Will do in a sec.

This PR just needs a rebase from the recent merges...

Rebase done. Should be mergable now.

JensRantil commented 10 years ago

Will do in a sec.

I seem to have a couple of conflicts. Will submit hopefully tomorrow.

mreiferson commented 10 years ago

looks like travis is reporting test failures on this branch...

JensRantil commented 10 years ago

looks like travis is reporting test failures on this branch...

Fixed. My bad. Usually I get an e-mail when Travis is failing. Not sure why I didn't this time.