2017-04-11 22:09:05 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const common = require('../common');
|
|
|
|
|
2017-07-01 01:29:09 +02:00
|
|
|
if (!common.hasCrypto)
|
2017-04-11 22:09:05 +02:00
|
|
|
common.skip('missing crypto');
|
|
|
|
|
2017-07-01 01:29:09 +02:00
|
|
|
if (common.hasFipsCrypto)
|
2017-04-11 22:09:05 +02:00
|
|
|
common.skip('some benchmarks are FIPS-incompatible');
|
|
|
|
|
2017-08-24 09:15:55 +02:00
|
|
|
const runBenchmark = require('../common/benchmark');
|
|
|
|
|
|
|
|
runBenchmark('crypto',
|
|
|
|
[
|
|
|
|
'algo=sha256',
|
|
|
|
'api=stream',
|
2018-05-30 10:46:38 +02:00
|
|
|
'cipher=',
|
2017-08-24 09:15:55 +02:00
|
|
|
'keylen=1024',
|
|
|
|
'len=1',
|
2018-05-30 10:46:38 +02:00
|
|
|
'n=1',
|
2017-08-24 09:15:55 +02:00
|
|
|
'out=buffer',
|
|
|
|
'type=buf',
|
|
|
|
'v=crypto',
|
2018-05-30 10:46:38 +02:00
|
|
|
'writes=1',
|
2017-08-24 09:15:55 +02:00
|
|
|
],
|
|
|
|
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|