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

Function m

test/parallel/test-perf-hooks-timerify-histogram-sync.mjs:9–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const histogram = createHistogram();
8
9const m = () => {
10 // Deterministic blocking delay (~1 millisecond). The histogram operates on
11 // nanosecond precision, so this should be sufficient to prevent zero timings.
12 sleepSync(1);
13};
14const n = timerify(m, { histogram });
15assert.strictEqual(histogram.max, 0);
16for (let i = 0; i < 10; i++) {

Callers

nothing calls this directly

Calls 1

sleepSyncFunction · 0.85

Tested by

no test coverage detected