0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
nodejs/test/benchmark/test-benchmark-crypto.js
Rich Trott b5420c9577 test: move benchmark tests out of main test suite
Move benchmark tests (which are slow) out of the main test suite. We can
hopefully add them to node-daily-master so that they are still run daily
on CI.

PR-URL: https://github.com/nodejs/node/pull/24265
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-10 22:44:26 -08:00

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 });