Interface RequestMeasurer

Measures network metrics of an HTTP request and the associated HTTP response.

interface RequestMeasurer {
    markRequestStart(timestamp): void;
    markResponseData(timestamp, data): void;
    markResponseEnd(timestamp): void;
    markResponseStart(timestamp): void;
}

Methods

  • Marks the start time in milliseconds of a new HTTP request. This method should only be called once.

    Parameters

    • timestamp: number

      The start time in milliseconds.

    Returns void

  • Marks the time in milliseconds at which new data is received as part of the current HTTP response. This method should only be called after markResponseStart has been called.

    Parameters

    • timestamp: number

      The data reception time in milliseconds.

    • data: Uint8Array

      the Uint8Array of the received bytes.

    Returns void

  • Marks the end time in milliseconds of the HTTP response. This methods should only be called once after markResponseStart or markResponseData.

    Parameters

    • timestamp: number

      The end time in milliseconds.

    Returns void

  • Marks the start time in milliseconds of the HTTP response of the HTTP request. This is the time at which the first byte of the HTTP response is received. This method should only be called once and after markRequestStart has been called.

    Parameters

    • timestamp: number

      The start time in milliseconds.

    Returns void

Generated using TypeDoc