node/test/benchmark/test-benchmark-napi.js
Vladimir Morozov 4f30c21c59
node-api: use Node-API in comments
PR-URL: https://github.com/nodejs/node/pull/61320
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-01-20 14:36:00 +01:00

20 lines
485 B
JavaScript

'use strict';
const common = require('../common');
if (common.isWindows) {
common.skip('vcbuild.bat doesn\'t build the Node-API benchmarks yet');
}
const { isMainThread } = require('worker_threads');
if (!isMainThread) {
common.skip('addons are not supported in workers');
}
if (common.isDebug) {
common.skip('benchmark does not work with debug build yet');
}
const runBenchmark = require('../common/benchmark');
runBenchmark('napi', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });