Class TrackerBase<V, SeenResultType>Abstract

Base tracker class

Type Parameters

  • V
  • SeenResultType

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

debug: boolean
id: string

Accessors

  • get elapsed(): number
  • Returns the elapsed milliseconds since the initial value

    Returns number

  • get initial(): undefined | V
  • Returns the initial value, or undefined

    Returns undefined | V

  • get last(): undefined | V
  • Returns undefined | V

Methods

  • Notification that buffer has been trimmed

    Parameters

    Returns void

  • Reset tracker

    Returns void

  • Adds a value, returning computed result.

    At this point, we check if the buffer is larger than resetAfterSamples. If so, reset() is called. If not, we check sampleLimit. If the buffer is twice as large as sample limit, trimStore() is called to take it down to sample limit, and onTrimmed() is called.

    Parameters

    • Rest...p: V[]

    Returns SeenResultType

  • Parameters

    • limit: number

    Returns number