/** * Metrics Collector - System metrics collection and aggregation */ import { EventEmitter } from 'eventemitter3'; import { PerformanceMetrics, OperationResult } from '../types'; export declare class MetricsCollector extends EventEmitter { private _metrics; private _requestAccumulator; private _activeConnections; private _queueLength; private _prevCpuTimes; constructor(); initialize(): Promise; /** Record a completed request. latencyMs is the end-to-end response time. */ recordRequest(latencyMs: number, isError?: boolean): void; /** Adjust the active connection counter by a delta (e.g. +1 on open, -1 on close). */ trackConnection(delta: number): void; /** Set the current queue length directly. */ trackQueueLength(length: number): void; collectMetrics(): PerformanceMetrics; shutdown(): Promise; /** Aggregate tick counts across all CPU cores into a single CpuTimes object. */ private _aggregateCpuTimes; /** Calculate CPU utilisation as a 0-1 value from two CpuTimes snapshots. */ private _calculateCpuUsage; } //# sourceMappingURL=MetricsCollector.d.ts.map