From 35c96156d17f6e8896d0304b9a557ead46ee4469 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Wed, 17 May 2023 14:51:53 +0900 Subject: [PATCH] benchmark: use `cluster.isPrimary` instead of `cluster.isMaster` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- 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'],