Search Results for

    / fm / liveswitch / DiagnosticSampler

    Class: DiagnosticSampler

    fm.liveswitch.DiagnosticSampler

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

    Table of contents

    Constructors

    • constructor

    Methods

    • addSample
    • fmliveswitchDiagnosticSamplerInit
    • getAverage
    • getCount
    • getLabel
    • getLastValue
    • getMax
    • getMin
    • getSamplesInAverage
    • getSum
    • getTypeString

    Constructors

    constructor

    + new DiagnosticSampler(): DiagnosticSampler

    Creates a new instance of the DiagnosticRecord.

    Returns: DiagnosticSampler

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:32

    + new DiagnosticSampler(averageSampleCount: number): DiagnosticSampler

    Creates a new instance of the DiagnosticRecord.

    Parameters:

    Name Type Description
    averageSampleCount number How many samples to include in the average.

    Returns: DiagnosticSampler

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:38

    + new DiagnosticSampler(averageSampleCount: number, label: string): DiagnosticSampler

    Creates a new instance of the DiagnosticRecord.

    Parameters:

    Name Type Description
    averageSampleCount number How many samples to include in the average.
    label string The label for this sampler.

    Returns: DiagnosticSampler

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:45

    + new DiagnosticSampler(label: string): DiagnosticSampler

    Creates a new instance of the DiagnosticRecord.

    Parameters:

    Name Type Description
    label string The label for this sampler.

    Returns: DiagnosticSampler

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:53

    Methods

    addSample

    ▸ addSample(longSample: number): void

    Adds a new sample to the calculation.

    Parameters:

    Name Type Description
    longSample number The sample to add.

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:154


    fmliveswitchDiagnosticSamplerInit

    ▸ PrivatefmliveswitchDiagnosticSamplerInit(): void

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:29


    getAverage

    ▸ getAverage(): number

    Gets the average of all samples.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:183


    getCount

    ▸ getCount(): number

    Gets how many samples this record has used.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:200


    getLabel

    ▸ getLabel(): string

    Gets the label for this sampler.

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:212


    getLastValue

    ▸ getLastValue(): number

    Gets the value of the last sample recorded.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:224


    getMax

    ▸ getMax(): number

    Gets the maximum sample ever recorded.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:236


    getMin

    ▸ getMin(): number

    Gets the minimum sample ever recorded.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:248


    getSamplesInAverage

    ▸ getSamplesInAverage(): number

    Gets how many samples are included in the average.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:260


    getSum

    ▸ getSum(): number

    Gets the sum of all values.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:272


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/DiagnosticSampler.ts:9

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.14.6