GroupedStat
Marker interface for stats whose result is a GroupResult. Implemented by StatGroup and its modality variants. Used in the group declarator below to enforce that nested-group entries actually produce GroupResult rather than some other Result shape.
Inheritors
Properties
Thread-safety mode fixed at construction. See Concurrency for the shared contract and the implementation's KDoc for its cell and lock strategy.
Functions
Create an independent accumulator at the configured baseline. A null concurrency preserves this accumulator's mode; a non-null value overrides it. Modality subtypes narrow the return type to preserve the input shape.
Fold a compatible snapshot values into this accumulator at timestampNanos. Implementations document whether the combine is exact or approximate and which state the snapshot omits. The source accumulator is unaffected.
Return the current result evaluated at timestampNanos. Time-independent statistics ignore the timestamp. Reading does not add an observation.
Restore the configured baseline, including any prior seed. Preserves the configuration and concurrency.