For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-api/performance-api/performance-metric.md.
Lynx
  • 简体中文
  • PerformanceMetric BTS

    描述性能指标名称、指标值和起止时间戳的类型。

    Lynx 中提供了 MetricFcpEntryMetricActualFmpEntry 等指标类型, 根据起始点的不同,每个指标类型中都包含多个指标(如:MetricFcpEntry 中包含 fcplynxFcptotalFcp 指标)。为此,设计了 PerformanceMetric,更好的描述每个指标的耗时和起止时间戳。

    实例属性

    name

    name: string;

    指标的名称,如 fcplynxFcptotalFcp 等。

    duration

    duration: number;

    指标的时长。该时长是一个表示为浮点型的数值(单位:毫秒),精确到小数点后三位。例如:100.099。

    计算公式为:duration = endTimestamp - startTimestamp

    startTimestampName

    startTimestampName: string;

    指标的开始时间戳名称,如 LoadBundleEntry 中的 loadBundleStart

    startTimestamp

    startTimestamp: number;

    指标的开始时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。

    endTimestampName

    endTimestampName: string;

    指标的结束时间戳名称,如 LoadBundleEntry 中的 paintEnd

    endTimestamp

    endTimestamp: number;

    指标的结束时间戳。该时间戳是一个表示为浮点型的 Unix 时间戳(单位:毫秒),精确到小数点后三位。例如:1739594612307.429。

    兼容性

    LCD tables only load in the browser

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