Conversation
If you have multiple different timers then this will speed up the processing time.
|
Fixed merge conflicts. Feel free to revisit. |
|
Thanks @JensRantil for this contributions. Can you share some benchmark deltas for this changeset? |
Feels like I made this pull request an eternity ago. Anyway, here are some benchmarks: So, Oh, also, the tests seem to pass despite Travis failing this: |
|
travis test failure was "index out of range" when indexing into position 0 of the slice func processTimer(buffer *bytes.Buffer, now int64, pctls Percentiles, u string, t Uint64Slice) {
sort.Sort(t)
min := t[0]Also, it failed while testing with go1.0.3 - is it possible that some difference between the version of go you use and go1.0.3 means |
|
I tried to recreate this. So far, nothing: I am running Go 1.1 branch. Do you have a Go 1.0 installation at hand perhaps? Can you recreate this? |
| defer wg.Done() | ||
| numchan <- processTimers(&buffer, now, percentThreshold) | ||
| }() | ||
| wg.Done() |
There was a problem hiding this comment.
| wg.Done() | |
| wg.Wait() |
Make the flush operation execute in parallel.
These optimizations have been mentioned in #23.
Additional comments:
syncpackage and only use channels. In this case, I thoughtsync.WaitGroupfelt like they were making the code more understandable. I might be wrong.