• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common.js');
3const { win32 } = require('path');
4
5const bench = common.createBenchmark(main, {
6  path: [
7    '',
8    '.',
9    '//server',
10    'C:\\baz\\..',
11    'C:baz\\..',
12    'bar\\baz',
13  ],
14  n: [1e5]
15});
16
17function main({ n, path }) {
18  bench.start();
19  for (let i = 0; i < n; i++) {
20    win32.isAbsolute(i % 3 === 0 ? `${path}${i}` : path);
21  }
22  bench.end(n);
23}
24