/** * Simple instrumentation for profiling happy-dom hot paths. * Enable by setting HAPPY_DOM_INSTRUMENTATION=1 environment variable. */ interface CallStats { count: number; totalTime: number; } /** * Wraps a function to track call count and time. */ export declare function instrument any>(name: string, fn: T): T; /** * Increments a counter for a specific operation. */ export declare function count(name: string): void; /** * Returns collected stats. */ export declare function getStats(): Map; /** * Clears all stats. */ export declare function clearStats(): void; /** * Prints stats sorted by call count. */ export declare function printStats(): void; /** * Writes stats to a JSON file. */ export declare function writeStatsToFile(filePath: string): void; export declare const isEnabled: boolean; export {}; //# sourceMappingURL=Instrumentation.d.ts.map