summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2018-10-17 14:27:54 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2018-10-19 15:06:51 -0700
commite5accf546c30a813e268ca299c1dc8eed0adeb80 (patch)
tree7f9cdbf211220c22f4f7fe06612f95a1a303148a /benchmark
parent814f89db61b1bed434c6cd5b7cba2849aee2c6fc (diff)
downloadandroid-node-v8-e5accf546c30a813e268ca299c1dc8eed0adeb80.tar.gz
android-node-v8-e5accf546c30a813e268ca299c1dc8eed0adeb80.tar.bz2
android-node-v8-e5accf546c30a813e268ca299c1dc8eed0adeb80.zip
benchmark: coerce PORT to number
Without this fix net/tcp-raw-c2s.js aborts in environments where PORT is defined. TCPWrap::Connect expects the third arg to be a UInt32. PR-URL: https://github.com/nodejs/node/pull/23721 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/_http-benchmarkers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js
index 76e02504b2..9079dff3ff 100644
--- a/benchmark/_http-benchmarkers.js
+++ b/benchmark/_http-benchmarkers.js
@@ -8,7 +8,7 @@ const requirementsURL =
'https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md#http-benchmark-requirements';
// The port used by servers and wrk
-exports.PORT = process.env.PORT || 12346;
+exports.PORT = Number(process.env.PORT) || 12346;
class AutocannonBenchmarker {
constructor() {