mirror of
https://github.com/nodejs/node.git
synced 2025-05-10 17:57:53 +00:00

Prevent crypto benchmark files from running more than one benchmark during tests. PR-URL: https://github.com/nodejs/node/pull/21032 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
27 lines
624 B
JavaScript
27 lines
624 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
if (common.hasFipsCrypto)
|
|
common.skip('some benchmarks are FIPS-incompatible');
|
|
|
|
const runBenchmark = require('../common/benchmark');
|
|
|
|
runBenchmark('crypto',
|
|
[
|
|
'algo=sha256',
|
|
'api=stream',
|
|
'cipher=',
|
|
'keylen=1024',
|
|
'len=1',
|
|
'n=1',
|
|
'out=buffer',
|
|
'type=buf',
|
|
'v=crypto',
|
|
'writes=1',
|
|
],
|
|
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|