MCPcopy Index your code
hub / github.com/nodejs/node / mockFiles

Function mockFiles

benchmark/permission/permission-startup.js:7–14  ·  view source on GitHub ↗
(n, prefix = '/tmp')

Source from the content-addressed store, hash-verified

5const { spawnSync } = require('child_process');
6
7function mockFiles(n, prefix = '/tmp') {
8 const files = [];
9 for (let i = 0; i < n; ++i) {
10 files.push(prefix + '/file' + i + '.js');
11 }
12
13 return files;
14}
15
16const bench = common.createBenchmark(main, {
17 script: [

Callers 1

mainFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…