Stores a bounded-size buffer of performance entries and provides convenience functions for accessing subsets of the buffer. Very simple circular buffer.

Hierarchy

  • StatsLogger

Index

Properties

buffer

buffer: PerformanceEntry[] = []

Private buffersize

buffersize: number = 10000

Private idx

idx: number = 0

Private lastError

lastError: number = 0

Methods

getEntries

  • Returns only entries that match all of the given filter configs.

    Parameters

    Returns PerformanceEntry[]

Private incrementIdx

  • incrementIdx(): void

Private pushEntry

  • pushEntry(entry: PerformanceEntry): void
  • Parameters

    • entry: PerformanceEntry

    Returns void

pushList

  • pushList(entries: PerformanceEntry[]): void
  • Ingests the given performance entries into the buffer.

    Parameters

    • entries: PerformanceEntry[]

    Returns void

receiveStatsJson

  • receiveStatsJson(entriesJson: string): void
  • Target for receiving stats entries from other threads - there was some issue with encoding that I couldn't figure out so I just kludged it.

    Parameters

    • entriesJson: string

    Returns void

updateBuffersize

  • updateBuffersize(): void