0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 13:09:21 +01:00

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>
This commit is contained in:
Deokjin Kim 2023-05-17 14:51:53 +09:00 committed by GitHub
parent 6774144404
commit ca096563e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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],

View File

@ -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'],