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>
This commit is contained in:
parent
814f89db61
commit
e5accf546c
@ -8,7 +8,7 @@ const requirementsURL =
|
|||||||
'https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md#http-benchmark-requirements';
|
'https://github.com/nodejs/node/blob/master/doc/guides/writing-and-running-benchmarks.md#http-benchmark-requirements';
|
||||||
|
|
||||||
// The port used by servers and wrk
|
// The port used by servers and wrk
|
||||||
exports.PORT = process.env.PORT || 12346;
|
exports.PORT = Number(process.env.PORT) || 12346;
|
||||||
|
|
||||||
class AutocannonBenchmarker {
|
class AutocannonBenchmarker {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user