StorageStatsTracker <T>
Index
Constructors
constructor
Parameters
initial: T
Returns StorageStatsTracker<T>
Accessors
current
Return a snapshot of the current counters. The returned object is a copy and safe to keep.
Returns T
Methods
add
Increment a counter bucket by
by(default1).Parameters
key: keyof T
by: number = 1
Returns void
A tiny mutable counter that the storage frontends increment on each client call and expose through a read-only
statssnapshot. Generic over the concrete counter shape so each storage type gets only the buckets that make sense for it.