@dudousxd/nestjs-telescope
Version:
Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.
15 lines • 833 B
TypeScript
import type { Entry } from '../entry/entry.js';
import { type RollupDelta } from './rollup-store.js';
/**
* Folds a batch of entries into additive rollup deltas, grouped by
* `(type, floorToBucket(createdAt))`. Pure & deterministic:
* - `count` = number of entries in the group,
* - `sum` = Σ durationMs (null treated as 0),
* - `max` = max durationMs (0 when every entry's durationMs is null),
* - `histogram` = fixed-size latency-bucket counts; ONLY entries with a non-null
* `durationMs` increment a cell (null durations contribute to count/sum/max as
* before but NOT to the histogram). Memory-safe: a small fixed-length integer
* array per group, never any retained entry references.
*/
export declare function aggregateDeltas(entries: Entry[]): RollupDelta[];
//# sourceMappingURL=aggregate-deltas.d.ts.map