From 36035e06578bcda0e10cf02d06b7930996d5201a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 11 Apr 2021 16:57:59 -0700 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Ricky Zhou <0x19951125@gmail.com> --- benchmark/_http-benchmarkers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index 615579cba52416..ec0e80a9e7edbe 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -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]; } }