/** * Performance timing utilities for RecourseOS evaluations. * * Used to measure latency and enforce SLA targets. */ /** * SLA targets for different operation types (in milliseconds). * * These are p95 targets - 95% of evaluations should complete within these times. */ export declare const SLA_TARGETS: { /** Single resource evaluation without network calls */ readonly localEvaluation: 10; /** Single resource evaluation with AWS state lookup */ readonly remoteEvaluation: 500; /** Full plan evaluation (up to 50 resources) */ readonly planEvaluation: 2000; /** Shell command parsing and evaluation */ readonly shellEvaluation: 5; /** MCP tool call evaluation */ readonly mcpEvaluation: 10; }; export type SLATarget = keyof typeof SLA_TARGETS; /** * Timing metrics for an evaluation. */ export interface EvaluationTiming { /** Total wall-clock time in milliseconds */ totalMs: number; /** Time spent in parsing/preparation */ parseMs?: number; /** Time spent in blast radius analysis */ analysisMs?: number; /** Time spent in policy evaluation */ policyMs?: number; /** Time spent waiting for remote state lookups */ remoteMs?: number; /** Whether the evaluation met its SLA target */ metSla: boolean; /** The SLA target used for comparison */ slaTarget: SLATarget; /** The target time in milliseconds */ slaTargetMs: number; } /** * Timer for tracking evaluation performance. */ export declare class EvaluationTimer { private startTime; private phases; private slaTarget; constructor(slaTarget?: SLATarget); /** * Start timing a phase. */ startPhase(name: string): void; /** * End timing a phase. */ endPhase(name: string): number; /** * Get the duration of a completed phase. */ getPhaseMs(name: string): number | undefined; /** * Set the SLA target for this evaluation. */ setSlaTarget(target: SLATarget): void; /** * Complete timing and return metrics. */ finish(): EvaluationTiming; } /** * Format timing metrics for human-readable output. */ export declare function formatTiming(timing: EvaluationTiming): string; //# sourceMappingURL=timing.d.ts.map