/** * Performance profiler for agent traces. * * Analyzes traces to compute latency percentiles, token efficiency, * cost estimates, and bottleneck identification. */ import type { AgentTrace } from './types'; export interface PercentileStats { p50: number; p95: number; p99: number; avg: number; min: number; max: number; count: number; } export interface ToolProfile { name: string; count: number; total_ms: number; pct_of_total: number; latency: PercentileStats; } export interface ProfileResult { trace_count: number; total_steps: number; llm_latency: PercentileStats; tool_latency: PercentileStats; tool_breakdown: ToolProfile[]; token_efficiency: number; cost_per_query: number; total_cost: number; bottleneck: { name: string; pct: number; } | null; total_duration_ms: number; } /** * Profile one or more traces and return performance stats. */ export declare function profile(traces: AgentTrace[]): ProfileResult; /** * Format profile result for terminal display. */ export declare function formatProfile(result: ProfileResult): string; //# sourceMappingURL=profiler.d.ts.map