Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiagnosticSampler

A record that calculates the min, max, and average from integer samples.

Hierarchy

  • DiagnosticSampler

Index

Constructors

constructor

  • Creates a new instance of the DiagnosticRecord.

    Returns DiagnosticSampler

  • Creates a new instance of the DiagnosticRecord.

    Parameters

    • averageSampleCount: number

      How many samples to include in the average.

    Returns DiagnosticSampler

Properties

Private __arrayPointer

__arrayPointer: AtomicInteger
internal

Private __count

__count: AtomicLong
internal

Private __max

__max: AtomicLong
internal

Private __min

__min: AtomicLong
internal

Private __samples

__samples: number[]
internal

Private _lastValue

_lastValue: number
internal

Methods

addSample

  • addSample(longSample: number): void
  • Adds a new sample to the calculation.

    Parameters

    • longSample: number

      The sample to add.

    Returns void

getAverage

  • getAverage(): number
  • Gets the average of all samples.

    Returns number

getCount

  • getCount(): number
  • Gets how many samples this record has used.

    Returns number

getLastValue

  • getLastValue(): number
  • Gets the value of the last sample recorded.

    Returns number

getMax

  • getMax(): number
  • Gets the maximum sample ever recorded.

    Returns number

getMin

  • getMin(): number
  • Gets the minimum sample ever recorded.

    Returns number

getSamplesInAverage

  • getSamplesInAverage(): number
  • Gets how many samples are included in the average.

    Returns number

getTypeString

  • getTypeString(): string
  • Returns string

Private setLastValue

  • setLastValue(value: number): void
  • internal

    Parameters

    • value: number

    Returns void