performance.mark(name[, options])
在性能时间轴中创建新的 PerformanceMark 条目。PerformanceMark 是 PerformanceEntry 的子类,其 performanceEntry.entryType 始终为 'mark',而其 performanceEntry.duration 始终为 0。性能标记用于标记性能时间轴中的特定重要时刻。
¥Creates a new PerformanceMark entry in the Performance Timeline. A
PerformanceMark is a subclass of PerformanceEntry whose
performanceEntry.entryType is always 'mark', and whose
performanceEntry.duration is always 0. Performance marks are used
to mark specific significant moments in the Performance Timeline.
创建的 PerformanceMark 条目放入全局的性能时间轴,可以用 performance.getEntries、performance.getEntriesByName、performance.getEntriesByType 查询。当执行观察时,应使用 performance.clearMarks 手动从全局的性能时间轴中清除条目。
¥The created PerformanceMark entry is put in the global Performance Timeline
and can be queried with performance.getEntries,
performance.getEntriesByName, and performance.getEntriesByType. When the
observation is performed, the entries should be cleared from the global
Performance Timeline manually with performance.clearMarks.