Skip to content

Commit

Permalink
benchmark: use cluster.isPrimary instead of cluster.isMaster
Browse files Browse the repository at this point in the history
`cluster.isMaster` was deprecated. So need to use `cluster.isPrimary`
for benchmark.

Refs: #47981
PR-URL: #48002
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
deokjinkim authored and MoLow committed Jul 6, 2023
1 parent ccd2795 commit 2ba08ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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],
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http/cluster.js
Expand Up @@ -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'],
Expand Down

0 comments on commit 2ba08ac

Please sign in to comment.