summaryrefslogtreecommitdiff
path: root/deps/node/benchmark/path/relative-win32.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/benchmark/path/relative-win32.js')
-rw-r--r--deps/node/benchmark/path/relative-win32.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/deps/node/benchmark/path/relative-win32.js b/deps/node/benchmark/path/relative-win32.js
deleted file mode 100644
index 5f34fdf8..00000000
--- a/deps/node/benchmark/path/relative-win32.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-const common = require('../common.js');
-const { win32 } = require('path');
-
-const bench = common.createBenchmark(main, {
- paths: [
- ['C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb'].join('|'),
- ['C:\\', 'D:\\'].join('|'),
- ['C:\\foo\\bar\\baz', 'C:\\foo\\bar\\baz'].join('|'),
- ['C:\\foo\\BAR\\BAZ', 'C:\\foo\\bar\\baz'].join('|'),
- ['C:\\foo\\bar\\baz\\quux', 'C:\\'].join('|'),
- ],
- n: [1e5]
-});
-
-function main({ n, paths }) {
- var to = '';
- const delimIdx = paths.indexOf('|');
- if (delimIdx > -1) {
- to = paths.slice(delimIdx + 1);
- paths = paths.slice(0, delimIdx);
- }
-
- bench.start();
- for (let i = 0; i < n; i++) {
- if (i % 3 === 0)
- win32.relative(`${paths}${i}`, `${to}${i}`);
- else
- win32.relative(paths, to);
- }
- bench.end(n);
-}