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

Android

public void setExtraTiming(TimingHandler.ExtraTimingInfo extraTiming);

Parameters

  • extraTiming: TimingHandler.ExtraTimingInfo: Used to supplement key performance data before loading the Lynx page. The specific definition of ExtraTimingInfo is as follows:
public static class ExtraTimingInfo {
    // Page open time, corresponds to openTime in InitContainerEntry.
    public long mOpenTime = 0;
    // Timestamp for the start of preparing the TemplateBundle, corresponds to prepareTemplateStart in InitContainerEntry.
    public long mPrepareTemplateStart = 0;
    // Timestamp for the end of preparing the TemplateBundle, corresponds to prepareTemplateEnd in InitContainerEntry.
    public long mPrepareTemplateEnd = 0;
    // Timestamp for the start of container initialization, corresponds to containerInitStart in InitContainerEntry.
    public long mContainerInitStart = 0;
    // Timestamp for the end of container initialization, corresponds to containerInitEnd in InitContainerEntry.
    public long mContainerInitEnd = 0;
}

iOS

- (void)setExtraTiming:(LynxExtraTiming* _Nonnull)timing;

Parameters

  • timing: LynxExtraTiming*: Used to supplement key performance data before loading the Lynx page. The specific definition of LynxExtraTiming is as follows:
@interface LynxExtraTiming : NSObject

// Page open time, corresponds to openTime in InitContainerEntry.
@property(nonatomic, assign) uint64_t openTime;
// Timestamp for the start of preparing the TemplateBundle, corresponds to prepareTemplateStart in InitContainerEntry.
@property(nonatomic, assign) uint64_t prepareTemplateStart;
// Timestamp for the end of preparing the TemplateBundle, corresponds to prepareTemplateEnd in InitContainerEntry.
@property(nonatomic, assign) uint64_t prepareTemplateEnd;
// Timestamp for the start of container initialization, corresponds to containerInitStart in InitContainerEntry.
@property(nonatomic, assign) uint64_t containerInitStart;
// Timestamp for the end of container initialization, corresponds to containerInitEnd in InitContainerEntry.
@property(nonatomic, assign) uint64_t containerInitEnd;

@end

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.