diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index d544fc41c31e0f..4b50a14d171fc8 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -55,6 +55,17 @@ added: v8.5.0 If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline. If `name` is provided, removes only the named mark. +### `performance.clearMeasures([name])` + + + +* `name` {string} + +If `name` is not provided, removes all `PerformanceMeasure` objects from the +Performance Timeline. If `name` is provided, removes only the named mark. + ### `performance.eventLoopUtilization([utilization1[, utilization2]])` + +* Returns: {PerformanceEntry\[]} + +Returns a list of `PerformanceEntry` objects in chronological order with +respect to `performanceEntry.startTime`. If you are only interested in +performance entries of certain types or that have certain names, see +`performance.getEntriesByType()` and `performance.getEntriesByName()`. + +### `performance.getEntriesByName(name[, type])` + + + +* `name` {string} +* `type` {string} +* Returns: {PerformanceEntry\[]} + +Returns a list of `PerformanceEntry` objects in chronological order +with respect to `performanceEntry.startTime` whose `performanceEntry.name` is +equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to +`type`. + +### `performance.getEntriesByType(type)` + + + +* `type` {string} +* Returns: {PerformanceEntry\[]} + +Returns a list of `PerformanceEntry` objects in chronological order +with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` +is equal to `type`. + ### `performance.mark([name[, options]])`