export interface CometRuntimeMetricsSnapshot { gitCommands: number; gitDurationMs: number; } export interface CometRuntimeProgress { label: string; completed?: number; total?: number; elapsedMs: number; } /** 进度只用于诊断;不写入工作流,也不能改变执行结果。 */ export declare function reportCometRuntimeProgress(label: string, completed?: number, total?: number): void; export declare function withCometRuntimeProgress(operation: () => Promise, report?: (progress: CometRuntimeProgress) => void): Promise; /** * Keep the counter deliberately small and process-local. It is diagnostic * telemetry for the optional daemon benchmark, not a cache or a workflow * input, so it must never affect command behaviour. */ export declare function recordCometGitCommand(durationMs?: number): void; export declare function snapshotCometRuntimeMetrics(): CometRuntimeMetricsSnapshot; /** Attribute Git work to this request even when asynchronous handlers overlap. */ export declare function withCometRuntimeMetrics(operation: () => Promise): Promise<{ result: T; metrics: CometRuntimeMetricsSnapshot; }>; /** Count successful and failed Git subprocesses with their elapsed time. */ export declare function measureCometGitCommand(operation: () => T): T; export declare function measureCometGitCommandAsync(operation: () => Promise): Promise; //# sourceMappingURL=runtime-metrics.d.ts.map