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: nodejs#47981
PR-URL: nodejs#48002
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • 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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.