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

Reliable benchmarking in noisy environments #264

Merged
merged 15 commits into from
Feb 11, 2023
Merged

Conversation

mizdra
Copy link
Owner

@mizdra mizdra commented Feb 5, 2023

close: #258

@mizdra mizdra force-pushed the stabilize-benchmark branch 2 times, most recently from 03862d9 to d0d9de3 Compare February 8, 2023 15:37
@mizdra mizdra force-pushed the stabilize-benchmark branch 2 times, most recently from 32e0e01 to 1c70d08 Compare February 8, 2023 16:10
@mizdra mizdra marked this pull request as ready for review February 8, 2023 16:43
@mizdra mizdra force-pushed the stabilize-benchmark branch 5 times, most recently from 62a5373 to 11da893 Compare February 11, 2023 09:30
@mizdra mizdra added the Type: CI Changes to CI configuration files and scripts label Feb 11, 2023
@mizdra mizdra changed the title Stabilize benchmark Reliable benchmarking in noisy environments Feb 11, 2023
Comment on lines +102 to +104
# There is 3.6% noise (maximum score is 3.68% greater than minimum score) for 30 runs.
# This noise is a little loud but negligible in most situations.
# ref: https://github.com/mizdra/eslint-interactive/commit/b751cfdef788ac6eb6b39d2d015494123cae51c1#comments
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a much larger value than the noise presented at https://pythonspeed.com/articles/consistent-benchmarking-in-ci/.

The detailed cause is unknown, but it is probably related to the fact that the process performed by eslint-interactive is dominated by I/O to the file system. valgrind does not virtualize I/O to the file system, so it is strongly affected by the CI noise.

Copy link
Owner Author

@mizdra mizdra Feb 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, previous benchmarks showed 300% noise. Given that, that's a huge improvement!

https://mizdra.github.io/eslint-interactive/dev/bench/
image

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote the code to cause performance degradation as a test.

The score increased by 159.4 %. This satisfies the conditions for an alert to be triggered.

@mizdra
Copy link
Owner Author

mizdra commented Feb 11, 2023

Perfect! 💯💯💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: CI Changes to CI configuration files and scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stabilize benchmarks
1 participant