StreamStats
@rotorsoft/act-root / act/src / StreamStats
Type Alias: StreamStats<E>
StreamStats<
E> =object
Defined in: libs/act/src/types/ports.ts:280
Per-stream aggregated stats returned by Store.query_stats.
head and tail follow the git-log convention, not the Unix
head/tail convention:
headโ the latest event (highest id), always present.tailโ the earliest event (lowest id), opt-in via QueryStatsOptions.tail.
Type Parametersโ
Eโ
Event schemas; defaults to Schemas when the caller does not narrow.
Propertiesโ
count?โ
readonlyoptionalcount?:number
Defined in: libs/act/src/types/ports.ts:283
Total non-excluded event count for the stream, when
options.count is true.
headโ
readonlyhead:Committed<E, keyofE>
Defined in: libs/act/src/types/ports.ts:281
Latest non-excluded event for the stream.
names?โ
readonlyoptionalnames?:Readonly<Partial<Record<EventName<E>,number>>>
Defined in: libs/act/src/types/ports.ts:284
Sparse map of event name โ count of events with
that name, when options.names is true. Keys are typed as
EventName<E> so typos on lookup
(e.g. stats.names?.["TicktOpened"]) fail at compile time when the
caller narrows E. Empty object never returned โ a stream with no
matching events is absent from the result map entirely.
tail?โ
readonlyoptionaltail?:Committed<E, keyofE>
Defined in: libs/act/src/types/ports.ts:282
Earliest non-excluded event for the stream, when
options.tail is true.