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

feat: add statistical convergence and outlier detection #26

Merged
merged 13 commits into from
Jan 28, 2025

Conversation

nazarhussain
Copy link

Motivation

Make sure the benchmark have stable results in the unstable environments.

Description

  • Add statistical convergence algorithm to stop the benchmark earliest possible
  • Add an outlier cleanup option before calculating the average

Steps to test or reproduce

  • Run all tests

Copy link

github-actions bot commented Jan 27, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 7e27781 Previous: null Ratio
sum array with raw for loop 933.71 us/op
sum array with reduce 10.157 ms/op
sum array with reduce beforeEach 82.641 us/op
sum array with reduce before beforeEach 81.987 us/op
sum array with reduce high threshold 10.241 ms/op
sum array with reduce no threshold 10.209 ms/op

by benchmarkbot/action

@@ -65,6 +65,10 @@ export type BenchmarkOpts = {
setupFiles?: string[];
/** Trigger GC cleanup every test to have consistent memory usage */
triggerGC?: boolean;
/** The algorithm to detect the convergence to stop the benchmark function runs */
convergence?: "linear" | "cv";
Copy link
Member

Choose a reason for hiding this comment

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

what does cv mean? maybe include a brief description of each in the docstring

Copy link
Author

Choose a reason for hiding this comment

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

Added the detailed comments.

@nazarhussain nazarhussain merged commit 7efbd6f into main Jan 28, 2025
13 checks passed
@nazarhussain nazarhussain deleted the nh/convergence-update branch January 28, 2025 16:48
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.

2 participants