Skip to main content

Metrics 接口

🌐 Metrics interface

语法​

🌐 Signature

export interface Metrics

属性​

🌐 Properties

属性

🌐 Property

修饰符

🌐 Modifiers

类型

🌐 Type

描述

🌐 Description

默认

🌐 Default

Documents

optional

number

页面中的文档数量。

🌐 Number of documents in the page.

Frames

optional

number

页面中的帧数。

🌐 Number of frames in the page.

JSEventListeners

optional

number

页面上的事件数量。

🌐 Number of events in the page.

JSHeapTotalSize

optional

number

JavaScript 堆总大小,单位字节。

🌐 Total JavaScript heap size, in bytes.

JSHeapUsedSize

optional

number

已使用的 JavaScript 堆大小(字节)。

🌐 Used JavaScript heap size, in bytes.

LayoutCount

optional

number

完整或部分页面布局的总数。

🌐 Total number of full or partial page layouts.

LayoutDuration

optional

number

所有页面布局的总持续时间,单位为秒。

🌐 Combined duration of all page layouts, in seconds.

Nodes

optional

number

页面中的 DOM 节点数量。

🌐 Number of DOM nodes in the page.

RecalcStyleCount

optional

number

页面样式重新计算的总次数。

🌐 Total number of page style recalculations.

RecalcStyleDuration

optional

number

所有页面样式重新计算的总时长,单位为秒。

🌐 Combined duration of all page style recalculations, in seconds.

ScriptDuration

optional

number

JavaScript 执行的总时长,单位是秒。

🌐 Combined duration of JavaScript execution, in seconds.

TaskDuration

optional

number

浏览器执行的所有任务的总时长,单位为秒。

🌐 Combined duration of all tasks performed by the browser, in seconds.

Timestamp

optional

number

指标样本采集的时间戳,使用单调时间(自某个过去任意时刻起的秒数)。

🌐 The timestamp when the metrics sample was taken, in monotonic time (seconds since an arbitrary point in the past).