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

benchmark: simplify http benchmarker regular expression #38206

Merged
merged 1 commit into from Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/_http-benchmarkers.js
Expand Up @@ -173,7 +173,7 @@ class H2LoadBenchmarker {
}

processResults(output) {
const rex = /(\d+(?:\.\d+)) req\/s/;
const rex = /(\d+\.\d+) req\/s/;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe the original intent was to handle integer values? I don't know if that's necessary, please disregard if we know that doesn't happen.

Suggested change
const rex = /(\d+\.\d+) req\/s/;
const rex = /(\d+(?:\.\d+)?) req\/s/;

Copy link
Member

Choose a reason for hiding this comment

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

I think it shouldn't work with integers. The h2load output is something like "finished in 233.18s, 0.43 req/s, 105B/s" his docs

return rex.exec(output)[1];
}
}
Expand Down