Skip to main content
Version: Next

StorageStatsTracker <T>

A tiny mutable counter that the storage frontends increment on each client call and expose through a read-only stats snapshot. Generic over the concrete counter shape so each storage type gets only the buckets that make sense for it.

Index

Constructors

Accessors

Methods

Constructors

constructor

Accessors

current

  • get current(): T
  • Return a snapshot of the current counters. The returned object is a copy and safe to keep.


    Returns T

Methods

add

  • add(key, by): void
  • Increment a counter bucket by by (default 1).


    Parameters

    • key: keyof T
    • by: number = 1

    Returns void

Page Options