6 lines
353 B
TypeScript
6 lines
353 B
TypeScript
/** Observations belong in logs, never in content-addressed compiler outputs. */
|
|||
|
|
export const profile = (phase: string, started: number, details: Record<string, unknown> = {}) => {
|
||
|
|
if (process.env.QUIXOS_TRACE_PROFILE === "1")
|
||
|
|
console.error(`[qx-profile] ${JSON.stringify({ phase, ms: Math.round(performance.now() - started), ...details })}`);
|
||
|
|
};
|