mirror of
https://github.com/nodejs/node.git
synced 2025-05-12 09:36:17 +00:00

Wrote a sequential benchmark test for worker. This is to make sure the benchmark for work runs properly. PR-URL: https://github.com/nodejs/node/pull/23475 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
24 lines
654 B
JavaScript
24 lines
654 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
if (!common.enoughTestMem)
|
|
common.skip('Insufficient memory for Worker benchmark test');
|
|
|
|
// Because the worker benchmarks can run on different threads,
|
|
// this should be in sequential rather than parallel to make sure
|
|
// it does not conflict with tests that choose random available ports.
|
|
|
|
const runBenchmark = require('../common/benchmark');
|
|
|
|
runBenchmark('worker',
|
|
[
|
|
'n=1',
|
|
'sendsPerBroadcast=1',
|
|
'workers=1',
|
|
'payload=string'
|
|
],
|
|
{
|
|
NODEJS_BENCHMARK_ZERO_ALLOWED: 1
|
|
});
|