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

Function main

benchmark/vm/run-in-this-context.js:13–24  ·  view source on GitHub ↗
({ n, breakOnSigint, withSigintListener })

Source from the content-addressed store, hash-verified

11const vm = require('vm');
12
13function main({ n, breakOnSigint, withSigintListener }) {
14 const options = breakOnSigint ? { breakOnSigint: true } : {};
15
16 process.removeAllListeners('SIGINT');
17 if (withSigintListener)
18 process.on('SIGINT', () => {});
19
20 bench.start();
21 for (let i = 0; i < n; i++)
22 vm.runInThisContext('0', options);
23 bench.end(n);
24}

Callers

nothing calls this directly

Calls 5

runInThisContextMethod · 0.80
removeAllListenersMethod · 0.45
onMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…