Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « type-tag « napi « benchmark - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f85b9af8e7d597c0bc37f7548d266f4e770b7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';
const common = require('../../common.js');

let binding;
try {
  binding = require(`./build/${common.buildType}/binding`);
} catch {
  console.error(`${__filename}: Binding failed to load`);
  process.exit(0);
}

const bench = common.createBenchmark(main, {
  n: [1e3, 1e4, 1e5],
});

function main({ n }) {
  binding.tagObject(n, bench, bench.start, bench.end);
}