/** * Latency testing for guardrail benchmarking. * * This module implements end-to-end guardrail latency testing for different models. */ import { type GuardrailBundle } from '../../runtime'; import type { Context, Sample } from './types'; /** * Tests end-to-end guardrail latency for different models. */ export declare class LatencyTester { /** * Initialize the latency tester. * * @param _iterations - Retained for compatibility; each timing call specifies its iterations. */ constructor(_iterations?: number); /** * Calculate latency statistics from a list of times. * * @param times - List of latency times in seconds * @returns Dictionary with P50, P95, mean, and std dev (in milliseconds) */ calculateLatencyStats(times: number[]): Record; /** * Measure end-to-end guardrail latency per sample for a single model. * * @param context - Evaluation context with LLM client * @param stageBundle - Stage bundle configured for the specific model * @param samples - Full dataset samples * @param iterations - Number of samples to time (uses first N samples) * @param desc - Optional progress bar description * @returns Dictionary with latency statistics and raw times */ testGuardrailLatencyForModel(context: Context, stageBundle: GuardrailBundle, samples: Sample[], iterations: number, desc?: string): Promise>; private emptyLatencyResult; private percentile; } //# sourceMappingURL=latency-tester.d.ts.map