export interface AnalysisOptions { focus?: string[]; pid?: number; scope?: 'thread' | 'subtree'; top?: number; } export declare function analysisFiles(etl: string, options: AnalysisOptions): { result: string; progress: string; log: string; }; export type AnalysisState = { state: 'done'; result: Record; } | { state: 'failed'; error: string; } | { state: 'running'; eventsRead?: number; elapsedSeconds?: number; }; export declare function analysisState(files: ReturnType): AnalysisState | undefined; /** * Forget a failed analysis: its result, and its progress file too — a progress file under a minute * old reads as a run still going (one started by an earlier server process), so leaving it would * answer "analysing" for a run that has already died, instead of starting a new one. */ export declare function clearAnalysis(files: ReturnType): void; export declare function startAnalysis(exe: string, etl: string, options: AnalysisOptions, files: ReturnType): void; export declare function waitForAnalysis(files: ReturnType, seconds: number): Promise; /** Bound the reply: drop rows from the end of the longest ranking until it fits; never slice JSON. */ export declare function boundedAnalysis(result: Record, file: string, cap?: number): Record; //# sourceMappingURL=analysis.d.ts.map