PerformanceEntry

PerformanceEntry 是一个基类接口,用于描述性能事件的完整数据。所有性能事件都继承并扩展它,常见的包括容器初始化、页面加载和渲染时间等。

所有性能事件汇总如下图所示:

实例属性

entryType

entryType: string;

表示 PerformanceEntry 类型的字符串。当前支持的类型有:initmetricpipeline,其含义如下:

  • init: 记录 Lynx 页面显示前的初始化性能事件。
  • metric: 记录性能指标事件,如 FCP(First Contentful Paint)和 ActualFMP(Actual First Meaningful Paint)。
  • pipeline: 记录渲染过程的性能事件。

以上取值所有对应的 PerformanceEntry 子类如下表所示:

entryType子类型
initInitContainerEntry, InitLynxviewEntry, InitBackgroundRuntimeEntry
metricMetricFcpEntry, MetricActualfmpEntry
pipelinePipelineEntry, LoadBundleEntry

name

name: string;

表示 PerformanceEntry 名称的字符串。值取决于 PerformanceEntry 的具体类型。所有子类型对应的 name 如下表所示:

子类型name
InitContainerEntrycontainer
InitLynxviewEntrylynxview
InitBackgroundRuntimeEntrybackgroundRuntime
MetricFcpEntryfcp
MetricActualFmpEntryactualFmp
PipelineEntryupdateTriggeredByBts, updateTriggeredByNative, updateGlobalProps, setNativeProps
LoadBundleEntryloadBundle, reloadBundleFromNative, reloadFromBts

兼容性

LCD tables only load in the browser

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。