bmizerany / perks

Effective Computation of Things
BSD 2-Clause "Simplified" License
186 stars 53 forks source link

Reproduces issue 8 #10

Closed aybabtme closed 8 years ago

aybabtme commented 10 years ago

r: @bmizerany cc: @leifwalsh

This seems to reproduce the situation described in issue #8.

However, I'm not sure if this behavior (near-zero values) is unexpected if the stream is reset often after reading a very few values... but I'm no expert on the domain.

The output looks like this:

$ go test ./...
--- FAIL: TestDoesntDegradeAfterResets (2.53 seconds)
    regression_test.go:22: perc50: want 0.5034867900486911, got 0.0014115440248851888
    regression_test.go:23: e: 0.997196
    regression_test.go:60: failed at second 15, 3 qps
    regression_test.go:22: perc50: want 0.48769729658334754, got 0.9819681965218967
    regression_test.go:23: e: 1.013479
    regression_test.go:60: failed at second 799, 1 qps
    regression_test.go:22: perc50: want 0.4886489836954619, got 0.003647536279147103
    regression_test.go:23: e: 0.992535
    regression_test.go:22: perc90: want 0.8853796193381923, got 0.003647536279147103
    regression_test.go:23: e: 0.995880
    regression_test.go:22: perc99: want 0.9791097199218912, got 0.003647536279147103
    regression_test.go:23: e: 0.996275
    regression_test.go:60: failed at second 1530, 1 qps
    regression_test.go:22: perc50: want 0.48757831397216517, got 0.0020130646351263133
    regression_test.go:23: e: 0.995871
    regression_test.go:60: failed at second 2023, 3 qps
    regression_test.go:22: perc99: want 0.9777245237282928, got 0.009280767616650837
    regression_test.go:23: e: 0.990508
    regression_test.go:60: failed at second 3221, 2 qps
FAIL
FAIL    github.com/bmizerany/perks/quantile 3.617s
aybabtme commented 10 years ago

Just to note, I do not have this issue, I was just reading the repo and looking at the PRs.

bmizerany commented 10 years ago

Thank you for the work! I'm waiting for a reply from @leifwalsh here https://github.com/bmizerany/perks/issues/8 before I can work through this.