diff options
author | Deokjin Kim <deokjin81.kim@gmail.com> | 2023-05-17 14:51:53 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 05:51:53 +0000 |
commit | ca096563e02acf79e572ea9eb7ba81722b1cb399 (patch) | |
tree | 6a95f029abcc9aef50192b5bfe3a6ff2c9640a50 | |
parent | 67741444043adae797021c14e309affb73e5ad56 (diff) | |
download | node-new-ca096563e02acf79e572ea9eb7ba81722b1cb399.tar.gz |
benchmark: use `cluster.isPrimary` instead of `cluster.isMaster`
`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.
Refs: https://github.com/nodejs/node/pull/47981
PR-URL: https://github.com/nodejs/node/pull/48002
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
-rw-r--r-- | benchmark/cluster/echo.js | 2 | ||||
-rw-r--r-- | benchmark/http/cluster.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/cluster/echo.js b/benchmark/cluster/echo.js index bedfa06325..71ded75c9d 100644 --- a/benchmark/cluster/echo.js +++ b/benchmark/cluster/echo.js @@ -1,7 +1,7 @@ 'use strict'; const cluster = require('cluster'); -if (cluster.isMaster) { +if (cluster.isPrimary) { const common = require('../common.js'); const bench = common.createBenchmark(main, { workers: [1], diff --git a/benchmark/http/cluster.js b/benchmark/http/cluster.js index ea0d925d8c..789bfc0e4d 100644 --- a/benchmark/http/cluster.js +++ b/benchmark/http/cluster.js @@ -4,7 +4,7 @@ const PORT = common.PORT; const cluster = require('cluster'); let bench; -if (cluster.isMaster) { +if (cluster.isPrimary) { bench = common.createBenchmark(main, { // Unicode confuses ab on os x. type: ['bytes', 'buffer'], |