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