summaryrefslogtreecommitdiff
path: root/test/benchmark/test-benchmark-napi.js
blob: 1a1ff23d60c5c07ae8897214dbec53655d6cd79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';

const common = require('../common');

if (common.isWindows) {
  common.skip('vcbuild.bat doesn\'t build the n-api benchmarks yet');
}

if (!common.isMainThread) {
  common.skip('addons are not supported in workers');
}

if (process.features.debug) {
  common.skip('benchmark does not work with debug build yet');
}
const runBenchmark = require('../common/benchmark');

runBenchmark('napi',
             [
               'n=1',
               'engine=v8',
               'type=String'
             ],
             { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });