Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stddev from benchmark to do a statistical test #52

Merged
merged 5 commits into from
Jun 8, 2023
Merged

Use stddev from benchmark to do a statistical test #52

merged 5 commits into from
Jun 8, 2023

Conversation

fonsp
Copy link
Member

@fonsp fonsp commented Jun 8, 2023

We currently get some random test failures, because the benchmarks are hardcoded to be "within 1.2 times the time from Distributed". I found that:

  • @belapsed is the minimum time, not mean time. That's still an interesting measure (which gets more accurate with more samples) but I believe it has a higher spread? In any case, my intention is to test mean time.
  • seconds=1 makes our tests fast but not worth the high random failure rate
  • By doing actual stats, we can control the "admissible false positive" rate, which I set to 2.5% right now. It should be pretty low because we have so many CI runners.

Right now the PR changes our goal to be "97% sure that we are not slower".
This should probably be: "97% sure that we are not more than 20% slower". EDIT no its fine

@fonsp fonsp changed the title Use stddev from benchmark to Use stddev from benchmark to do a statistical test Jun 8, 2023
@fonsp
Copy link
Member Author

fonsp commented Jun 8, 2023

Hm, in the BenchmarkTools docs there is a section about comparing results, but they just use a fixed tolerance of 1.05 (customizable), instead of taking the stddev into account...

https://juliaci.github.io/BenchmarkTools.jl/stable/manual/#Handling-benchmark-results

They also recommend median instead of mean to be less sensitive to outliers. That makes sense but I forgot how to do statistics with medians instead of means...

@fonsp fonsp merged commit 0d88ca0 into main Jun 8, 2023
@fonsp fonsp deleted the stats branch June 8, 2023 14:35
@fonsp
Copy link
Member Author

fonsp commented Jun 8, 2023

leaving the windows failure for another day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant