From fab804ce095f457438f480352b8b8b9d47a9a37d Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sun, 14 May 2023 22:54:39 +0900 Subject: [PATCH] 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 --- benchmark/cluster/echo.js | 2 +- 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 bedfa063257d63..71ded75c9d2572 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 ea0d925d8c94c4..789bfc0e4dc7ac 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'],