2018-10-13 02:13:33 +08:00
|
|
|
'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');
|
|
|
|
}
|
|
|
|
|
2024-08-13 20:37:02 +08:00
|
|
|
if (common.isDebug) {
|
2018-10-13 02:13:33 +08:00
|
|
|
common.skip('benchmark does not work with debug build yet');
|
|
|
|
}
|
|
|
|
const runBenchmark = require('../common/benchmark');
|
|
|
|
|
2020-02-13 02:34:00 +08:00
|
|
|
runBenchmark('napi', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|