@stephen-shopopop/node-metrics
    Preparing search index...

    A plugin that captures Node.js event loop utilization metrics.

    This plugin uses the performance.eventLoopUtilization() API to measure how much of the event loop's time is being utilized, and stores the utilization value in the provided context under the key 'event_loop_utilized'.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    name: string = EventLoopUtilizationPlugin.name

    Methods

    • Captures the current event loop utilization and sets it in the provided context.

      Parameters

      • ctx: MetricsContext

        The context object where the event loop utilization metric will be stored. The metric is stored under the key 'event_loop_utilized'. If this.elu is defined, it uses performance.eventLoopUtilization(this.elu).utilization; otherwise, it sets the value to 0.

      Returns void