# Performance

用于获取性能数据及创建性能监听器的对象。

# 方法

# Performance.createObserver

创建全局性能事件监听器。

# Performance.setBufferSize

设置性能数据缓冲区大小, 默认缓冲 30 条性能数据。

# Performance.getEntries

获取当前性能数据缓冲区中的所有性能数据。

# Performance.getEntriesByName

获取当前性能数据缓冲区中所有名称为 name 且类型为 entryType 的性能数据。

# Performance.getEntriesByType

获取当前性能数据缓冲区中所有类型为 entryType 的性能数据。

# Performance.mark

在性能数据缓冲区中使用给定名称添加一个 name 为 name 的性能数据。

# Performance.clearMarks

清空性能数据缓冲区中 name 为 name 的自定义性能数据。若不指定 name,清空所有自定义性能数据。

Copyright ©2024, All Rights Reserved