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: nodejs#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 Linkgoron committed Jan 31, 2022
1 parent 2156172 commit 69876df
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 69876df

Please sign in to comment.