Skip to content

Commit

Permalink
benchmark: simplify http benchmarker regular expression
Browse files Browse the repository at this point in the history
A non-capturing group inside a capturing group has no effect. Simplify
the regular expression.

PR-URL: #38206
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
  • Loading branch information
Trott authored and targos committed Jan 14, 2022
1 parent 07353e9 commit fa84353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class H2LoadBenchmarker {
}

processResults(output) {
const rex = /(\d+(?:\.\d+)) req\/s/;
const rex = /(\d+\.\d+) req\/s/;
return rex.exec(output)[1];
}
}
Expand Down

0 comments on commit fa84353

Please sign in to comment.