UNPKG

@dudousxd/nestjs-telescope

Version:

Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.

18 lines 756 B
import type { Entry } from '../entry/entry.js'; export interface TimeseriesBucket { /** ISO timestamp of the bucket's start. */ t: string; total: number; byType: Record<string, number>; } export interface TimeseriesReport { windowStart: string; windowEnd: string; bucketMs: number; buckets: TimeseriesBucket[]; } /** Group entries into `bucketCount` equal time buckets across [windowStart, * windowEnd], counting total + per-type per bucket. Pure: callers fetch the * windowed entries. Out-of-range entries are clamped into the edge buckets. */ export declare function bucketTimeseries(entries: Entry[], windowStart: Date, windowEnd: Date, bucketCount: number): TimeseriesReport; //# sourceMappingURL=timeseries.d.ts.map