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

test: Updated benchmark test results to output result files #2350

Merged
merged 12 commits into from
Jul 15, 2024

Conversation

mrickard
Copy link
Member

@mrickard mrickard commented Jul 12, 2024

Description

Updated run-bench.js and benchmark.js to complete asynchronous tests before generating statistics
Updated run-bench.js to allow JSON output to a file, and consolidate printing logic
Reduced cognitive complexity in run-bench.js

How to Test

npm run bench to run benchmark tests and output json result files to benchmark_results
Given two benchJson outputs, node bin/compare-bench-results.js {file1.json} {file2.json} will compare two benchmark runs, and write a markdown file to benchmark_results.

Related Issues

Closes NR-281645

mrickard and others added 10 commits July 12, 2024 17:13
…om run-bench, promisified the child-exit listener for JSON printing benchmark tests, temporarily bumped complexity threshold

Signed-off-by: mrickard <maurice@mauricerickard.com>
…t tests

Signed-off-by: mrickard <maurice@mauricerickard.com>
… counter

Signed-off-by: mrickard <maurice@mauricerickard.com>
…run-bench to handle non-json returns

Signed-off-by: mrickard <maurice@mauricerickard.com>
…ging of error, if a test is missing from one file.

Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
.gitignore Outdated Show resolved Hide resolved
bin/run-bench.js Outdated Show resolved Hide resolved
Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

much better, a lot of great improvements here, just a few suggestions

.gitignore Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
bin/run-bench.js Outdated Show resolved Hide resolved
Signed-off-by: mrickard <maurice@mauricerickard.com>
@mrickard mrickard added the dev:tests Indicates only changes to tests label Jul 15, 2024
…ark_results directory, removed extra NPM script

Signed-off-by: mrickard <maurice@mauricerickard.com>
Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

Nice work 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants