()
| 54 | // disabled or when nothing is live. Callers should not mutate the |
| 55 | // returned object — it's a fresh copy on every call. |
| 56 | export function stubSnapshot(): Record<string, number> { |
| 57 | const out: Record<string, number> = {}; |
| 58 | for (const [name, count] of counters) out[name] = count; |
| 59 | return out; |
| 60 | } |
| 61 | |
| 62 | // True iff tracking is on (env flag, globalThis override, or |
| 63 | // enableStubTracking() was called). Useful for skipping diagnostic |
no outgoing calls