MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / timeToString

Function timeToString

test/utils.ts:355–359  ·  view source on GitHub ↗
(t: number)

Source from the content-addressed store, hash-verified

353 t /= 1000;
354 return t.toFixed(2) + ' s';
355}
356
357export function benchmark(
358 fn: () => void,
359 expected?: { time: number; mem: number; exprs: number }
360) {
361 const startMem = process.memoryUsage().heapUsed;
362 const start = globalThis.performance.now();

Callers 1

benchmarkFunction · 0.85

Calls 1

toFixedMethod · 0.80

Tested by

no test coverage detected