/** * Sliding time window data structures for metric computation. * * Both windows use a chronologically-ordered deque and binary search for * pruning, keeping amortized cost O(log n) per event rather than O(n). * * @module alerting/sliding-window */ /** Tracks event counts for rate computation (e.g., failure_rate). */ export declare class CounterWindow { #private; constructor(windowMs: number); /** Record an event with its timestamp and failure status. */ record(timestamp: number, failed: boolean): void; /** Returns failure rate as a number between 0 and 1. Returns 0 if no events. */ rate(now: number): number; } /** Stores individual values for percentile computation (e.g., p99 duration). */ export declare class HistogramWindow { #private; constructor(windowMs: number); /** Record an observation with its timestamp. */ record(timestamp: number, value: number): void; /** Returns the p-th percentile value (p between 0 and 100). Returns 0 if no observations. */ percentile(p: number, now: number): number; }