(fn, iterations = 100)
| 58 | |
| 59 | // Measure execution time of a function |
| 60 | function 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 |
| 70 | function measureRenderTime(Component, props, iterations = 10) { |
no outgoing calls
no test coverage detected
searching dependent graphs…