current commit
260905.9 · lib: add runFile api to node:bench
'use strict';

const {
  ObjectAssign,
} = primordials;

const { emitExperimentalWarning } = require('internal/util');
const {
  after,
  afterEach,
  before,
  beforeEach,
  bench,
  suite,
} = require('internal/bench_runner/harness');
const {
  createRunner,
  run,
  runFile,
} = require('internal/bench_runner/runner');

if (process.env.NODE_BENCH_CONTEXT !== 'child' ||
    typeof process.send !== 'function') {
  emitExperimentalWarning('Benchmarks');
}

module.exports = bench;
ObjectAssign(module.exports, {
  after,
  afterEach,
  before,
  beforeEach,
  bench,
  createRunner,
  describe: suite,
  run,
  runFile,
  suite,
});