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 <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
  • 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
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.