dotnet / dotnet/BenchmarkDotNet
High error rates across benchmark runs
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 1.1k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 12
Description
I have a nice set of benchmarks (which you can see [here](https://github.com/microsoft/coyote/tree/master/Tests/Performance.Tests/Tests/Actors/StateMachines)) and they run fine, and report nice low error rates around 0.2 to 2% range.
But when I do the same benchmark run over and over (on the same machine of course) then compare the error range across all of these runs, the picture is not so nice with amount of discrepancy across runs ranging up to 20%. This shows 10 invocations of my benchmark runner and you can see each iteration is nice and stable with small standard deviations (shown in light blue), but the steps across each iteration are unexpected:

What is worse, when I run those 10 iterations again, I get completely different set of steps, showing that this is completely random noise of some kind:

So while one benchmark run has nice small standard deviations, the test is not repeatable, which makes it really hard to use this for performance regression testing. Any ideas how I can improve this?
Contributor guide
Assessment
This issue has not been assessed yet.