Vinyl
    Preparing search index...

    Interface NetworkMetricsController

    interface NetworkMetricsController {
        metrics: NetworkMetrics;
        addDownlinkTransferEntry(entry: NetworkTransferEntry): void;
        addMetricsEntry(entry: NetworkMetricsEntry): void;
        getServiceMetrics(serviceId: Maybe<string>): ServiceMetrics;
        hasAnyListeners(): boolean;
        hasListeners(type: "metricsChange"): boolean;
        on<K extends "metricsChange">(
            type: K,
            handler: EventHandler<NetworkMetricsEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    The current metrics state. The returned object is static at the time of request.

    Methods

    • Adds information about a completed body content read.

      Parameters

      Returns void

    • Adds information about a completed settled request. Note: This does not update estimated bandwidth.

      Parameters

      Returns void

    • Returns metrics for the given service id. If the service id is nullish, or there is no history for the given service, empty service metrics will be returned.

      The returned object is static at the time of request.

      Parameters

      Returns ServiceMetrics

    • Returns true if the event host has any listeners for the given type.

      Parameters

      • type: "metricsChange"

      Returns boolean