Constructors

  • Parameters

    • periodMs: number = minuteMs

      the length of time to retain event timestamps for computing rate. Events older than this value will be discarded.

    • warmupMs: number = secondMs

      return null from Rate#msPerEvent if it's been less than warmupMs since construction or Rate#clear.

    Returns Rate

Properties

periodMs: number = minuteMs

the length of time to retain event timestamps for computing rate. Events older than this value will be discarded.

warmupMs: number = secondMs

return null from Rate#msPerEvent if it's been less than warmupMs since construction or Rate#clear.

Accessors

  • get eventCount(): number
  • Returns number

  • get eventsPerMinute(): number
  • Returns number

  • get eventsPerMs(): number
  • Returns number

  • get eventsPerSecond(): number
  • Returns number

  • get msPerEvent(): null | number
  • Returns null | number

  • get msSinceLastEvent(): null | number
  • Returns null | number

Methods