Page.metrics()方法
¥Page.metrics() method
包含指标作为键/值对的对象。
¥Object containing metrics as key/value pairs.
签名
¥Signature
class Page {
abstract metrics(): Promise<Metrics>;
}
Returns:
Promise<Metrics>
-
Timestamp
:获取指标样本时的时间戳。¥
Timestamp
: The timestamp when the metrics sample was taken. -
Documents
:页面中的文档数。¥
Documents
: Number of documents in the page. -
Frames
:页面中的帧数。¥
Frames
: Number of frames in the page. -
JSEventListeners
:页面中的事件数。¥
JSEventListeners
: Number of events in the page. -
Nodes
:页面中 DOM 节点的数量。¥
Nodes
: Number of DOM nodes in the page. -
LayoutCount
:完整或部分页面布局的总数。¥
LayoutCount
: Total number of full or partial page layout. -
RecalcStyleCount
:页面样式重新计算的总数。¥
RecalcStyleCount
: Total number of page style recalculations. -
LayoutDuration
:所有页面布局的总持续时间。¥
LayoutDuration
: Combined durations of all page layouts. -
RecalcStyleDuration
:所有页面样式重新计算的总持续时间。¥
RecalcStyleDuration
: Combined duration of all page style recalculations. -
ScriptDuration
:JavaScript 执行的总持续时间。¥
ScriptDuration
: Combined duration of JavaScript execution. -
TaskDuration
:浏览器执行的所有任务的总持续时间。¥
TaskDuration
: Combined duration of all tasks performed by the browser. -
JSHeapUsedSize
:使用的 JavaScript 堆大小。¥
JSHeapUsedSize
: Used JavaScript heap size. -
JSHeapTotalSize
:JavaScript 堆总大小。¥
JSHeapTotalSize
: Total JavaScript heap size.
备注
¥Remarks
所有时间戳都是单调时间:自过去任意点以来单调增加的时间(以秒为单位)。
¥All timestamps are in monotonic time: monotonically increasing time in seconds since an arbitrary point in the past.