Closed cespare closed 10 years ago
Whoa. How did I miss this for so long? I'm sorry. Merging.
Thanks :) Nice meeting you yesterday btw
Hrm. I'm getting test failures:
$ go test ./...
ok github.com/bmizerany/perks/histogram 0.221s
--- FAIL: Example_simple (21.423106ms)
got:
perc50: 5
perc90: 17
perc99: 221
count: 2388
want:
perc50: 5
perc90: 14
perc99: 40
count: 2388
FAIL
FAIL github.com/bmizerany/perks/quantile 1.422s
ok github.com/bmizerany/perks/topk 1.732s
@cespare any development on the above?
Sorry for the test failure; I must've gotten too caught up in the benchmarks and forgotten to run the tests.
I dug into this for a few hours yesterday. The problem is in the list -> slice conversion, but it proved surprisingly hard to figure out where the logic in my version differs. I had to give up on it last night but I'll get back to it tonight or tomorrow and come back with a fixed version.
Np. Let me know if you find anything.
Fixed. It was an off-by-one error on my end. I rebased the fixed commits and re-ran the benchmarks.
PTAL
LGTM. Great work!!!!
:thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:
I started by adding more benchmarks to hit a variety of scenarios:
container/list
)Then I made three different changes. Each of those commits includes intermediate benchmark output.
Here's the final result: