setExtraTiming

This interface is used to supplement key performance data before loading the Lynx page, specifically including the following items from InitContainerEntry:

  • Page open time (openTime)
  • Timestamp for the start of preparing the TemplateBundle (prepareTemplateStart)
  • Timestamp for the end of preparing the TemplateBundle (prepareTemplateEnd)
  • Timestamp for the start of container initialization (containerInitStart)
  • Timestamp for the end of container initialization (containerInitEnd)

Upon successfully updating all timestamps using this interface, the InitContainerEntry performance event will be triggered. Depending on the timing of the configuration, it may also trigger the calculation of fcp, totalFcp, actualFmp, and totalActualFmp metrics, along with dispatching new performance events for MetricFcpEntry and MetricActualFmpEntry.

CAUTION

Timestamps within extraTiming cannot be overwritten, meaning that multiple calls to this interface attempting to repeatedly update a timestamp will yield no effect.

Syntax

Harmony

public setExtraTiming(extraTiming: LynxExtraTiming): void;

Parameters

  • extraTiming: Used to supplement key performance data before loading the Lynx page.

The specific definition of LynxExtraTiming is as follows:

export class LynxExtraTiming {
  public static readonly OPEN_TIME = 'openTime';
  public static readonly CONTAINER_INIT_START = 'containerInitStart';
  public static readonly CONTAINER_INIT_END = 'containerInitEnd';
  public static readonly PREPARE_TEMPLATE_START = 'prepareTemplateStart';
  public static readonly PREPARE_TEMPLATE_END = 'prepareTemplateEnd';

  public openTime: number = 0;
  public containerInitStart: number = 0;
  public containerInitEnd: number = 0;
  public prepareTemplateStart: number = 0;
  public prepareTemplateEnd: number = 0;
}

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.