( name: string, durationMs: number, detail?: Record<string, unknown> )
| 2 | process.env['NODE_ENV'] !== 'production' || process.env['ZEN_PERF'] === '1' |
| 3 | |
| 4 | export function recordMainPerf( |
| 5 | name: string, |
| 6 | durationMs: number, |
| 7 | detail?: Record<string, unknown> |
| 8 | ): void { |
| 9 | if (!MAIN_PERF_ENABLED) return |
| 10 | const rounded = Math.round(durationMs * 100) / 100 |
| 11 | console.info(`[zen:perf] ${name} ${rounded.toFixed(1)}ms`, detail ?? {}) |
| 12 | } |
no outgoing calls
no test coverage detected