mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
640b20616d
Mostly shared/duplicated logic between all benchmark test files, so creating a new common module to store it. PR-URL: https://github.com/nodejs/node/pull/15004 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
26 lines
597 B
JavaScript
26 lines
597 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',
|
|
[
|
|
'n=1',
|
|
'algo=sha256',
|
|
'api=stream',
|
|
'keylen=1024',
|
|
'len=1',
|
|
'out=buffer',
|
|
'type=buf',
|
|
'v=crypto',
|
|
'writes=1'
|
|
],
|
|
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|