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:
Rich Trott authored and Danielle Adams committed 2022-01-31 23:54:57 -05:00
1 parent 9467aa9bcf
commit 4a09904d05
1 file changed
+1 -1
+1 -1
View File
@@ -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];
}
}