mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
benchmark: simplify http benchmarker regular expression
A non-capturing group inside a capturing group has no effect. Simplify the regular expression. PR-URL: https://github.com/nodejs/node/pull/38206 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
This commit is contained in:
1 parent
9467aa9bcf
commit
4a09904d05
1 file changed
+1
-1
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user