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

Function main

benchmark/util/priority-queue.js:9–18  ·  view source on GitHub ↗
({ n })

Source from the content-addressed store, hash-verified

7}, { flags: ['--expose-internals'] });
8
9function main({ n }) {
10 const PriorityQueue = require('internal/priority_queue');
11 const queue = new PriorityQueue();
12 bench.start();
13 for (let i = 0; i < n; i++)
14 queue.insert(Math.random() * 1e7 | 0);
15 for (let i = 0; i < n; i++)
16 queue.shift();
17 bench.end(n);
18}

Callers

nothing calls this directly

Calls 6

insertMethod · 0.95
shiftMethod · 0.95
randomMethod · 0.80
requireFunction · 0.50
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…