mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
benchmark: added a test benchmark for worker
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>
This commit is contained in:
1 parent
1408e323f9
commit
cdca587b3d
1 file changed
+23
@@ -0,0 +1,23 @@
|
||||
'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
|
||||
});
|
||||
Reference in new issue
Block a user