()
| 17 | } |
| 18 | |
| 19 | export function installRenderTrace(): { |
| 20 | reset: () => void |
| 21 | snapshot: () => Map<string, number> |
| 22 | uninstall: () => void |
| 23 | } { |
| 24 | const store: RenderTraceStore = new Map() |
| 25 | ;(globalThis as Record<string, unknown>)[RENDER_TRACE_KEY] = store |
| 26 | return { |
| 27 | reset: () => store.clear(), |
| 28 | snapshot: () => new Map(store), |
| 29 | uninstall: () => { |
| 30 | delete (globalThis as Record<string, unknown>)[RENDER_TRACE_KEY] |
| 31 | }, |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | export function diffRenderTrace( |
| 36 | before: ReadonlyMap<string, number>, |
no test coverage detected