aboutsummaryrefslogtreecommitdiff
path: root/benchmark/fs/readFileSync.js
blob: 8fd0b50421e7614ca4efcfe5393887e7d206804a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';

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

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

function main(conf) {
  const n = +conf.n;

  bench.start();
  for (var i = 0; i < n; ++i)
    fs.readFileSync(__filename);
  bench.end(n);
}