Type Alias RateTrackerOpts

RateTrackerOpts: Readonly<{
    resetAfterSamples?: number;
    sampleLimit?: number;
    timeoutInterval?: Interval;
}>

Type declaration

  • OptionalresetAfterSamples?: number

    If above zero, tracker will reset after this many samples

  • OptionalsampleLimit?: number

    If above zero, there will be a limit to intermediate values kept.

    When the seen values is twice sampleLimit, the stored values will be trimmed down to sampleLimit. We only do this when the values are double the size so that the collections do not need to be trimmed repeatedly whilst we are at the limit.

    Automatically implies storeIntermediate

  • OptionaltimeoutInterval?: Interval

    If set, tracker will reset after this much time since last mark() call.