nextjs-perfkit
Version:
Frontend performance analyzer for Next.js apps – render time tracking, memory logging, network analysis, DevTools UI.
26 lines (25 loc) • 645 B
TypeScript
type LogType = "render" | "memory" | "network" | "custom";
interface PerfLogEntry {
type: LogType;
label: string;
duration?: number;
timestamp: string;
meta?: Record<string, any>;
}
/**
* Adds a new performance log entry to the internal log store
*/
export declare const addLog: (type: LogType, label: string, duration?: number, meta?: Record<string, any>) => void;
/**
* Returns all logs
*/
export declare const getLogs: () => PerfLogEntry[];
/**
* Clears all stored logs
*/
export declare const clearLogs: () => void;
/**
* Downloads logs as a JSON file
*/
export declare const downloadLogs: () => void;
export {};