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

Incorrect reset behavior on some tests #4

Open
bvisness opened this issue Nov 13, 2024 · 0 comments
Open

Incorrect reset behavior on some tests #4

bvisness opened this issue Nov 13, 2024 · 0 comments

Comments

@bvisness
Copy link

We have identified two benchmarks that do not reset correctly, leading to benchmark measurements that increase depending on the number of iterations. This is what we are currently using for our benchmark config:

exclude:microBenchmarks.ArrayCopyBenchmark.copyInSameArray
exclude:microBenchmarks.PrimeListBenchmark.calcEratosthenes

There may be others, but these benchmarks have bad behavior due to infinitely-growing arrays.

The problem, it seems, is that the test harness runs the @Setup and @TearDown functions at the beginning and end of the entire test suite, not per iteration. That is, @Setup runs only once before warmups, and @TearDown runs only once after all measurement iterations. This is, frankly, quite counterintuitive and I wonder if that is just a bug in the harness itself.

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

No branches or pull requests

1 participant