OINO TS
    Preparing search index...

    Class OINOBenchmarkAbstract

    Static class for benchmarking functions.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Add benchmark to be used for service health monitoring.

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      Returns void

    • Complete benchmark timing

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      • success: boolean = true

        indicates if the benchmark was successful

      Returns void

    • Get service health based on the configured health benchmark.

      Returns number

      service health as 0-1

    • Get given benchmark data.

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      Returns number

    • Remove benchmark from being used for service health monitoring.

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      Returns void

    • Set benchmark names that are enabled.

      Parameters

      • modules: string[]

        array of those benchmarks that are enabled

      Returns void

    • Set late ratio threshold for health monitoring. If a request takes this many times longer than the average duration, it is considered late and a health failure.

      Parameters

      • lateRatio: number

        of health benchmarks, e.g. 2.0 means requests that take 2 times longer than the average

      Returns void

    • Start benchmark timing.

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      Returns void

    • Track an exception. Does not consider enabled modules.

      Parameters

      • module: string

        of the benchmark

      • method: string

        of the benchmark

      • name: string

        of the exception

      • message: string

        of the exception

      • stack: string

        trace of the exception

      Returns void

    • Track a metric value

      Parameters

      • module: string

        of the metric

      • method: string

        of the metric

      • value: number

        of the metric

      • success: boolean = true

        indicates if the metric was successful

      Returns void