MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / measureTime

Function measureTime

test/spec/benchmark-test.js:60–67  ·  view source on GitHub ↗
(fn, iterations = 100)

Source from the content-addressed store, hash-verified

58
59// Measure execution time of a function
60function measureTime(fn, iterations = 100) {
61 const start = performance.now();
62 for (let i = 0; i < iterations; i++) {
63 fn();
64 }
65 const end = performance.now();
66 return (end - start) / iterations;
67}
68
69// Render component and measure time
70function measureRenderTime(Component, props, iterations = 10) {

Callers 1

benchmark-test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…