astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
23 lines (22 loc) • 554 B
TypeScript
/**
* Timer to track certain operations' performance. Used by Astro's scripts only.
* Set `process.env.ASTRO_TIMER_PATH` truthy to enable.
*/
export declare class AstroTimer {
private enabled;
private ongoingTimers;
private stats;
constructor();
/**
* Start a timer for a scope with a given name.
*/
start(name: string): void;
/**
* End a timer for a scope with a given name.
*/
end(name: string): void;
/**
* Write stats to `process.env.ASTRO_TIMER_PATH`
*/
writeStats(): void;
}