diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index c17c95c3d62e22..9b98415362e1f9 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -1,13 +1,18 @@ -# Performance Timing API +# Performance Measurement APIs > Stability: 2 - Stable -The Performance Timing API provides an implementation of the -[W3C Performance Timeline][] specification. The purpose of the API -is to support collection of high resolution performance metrics. -This is the same Performance API as implemented in modern Web browsers. +This module provides an implementation of a subset of the W3C +[Web Performance APIs][] as well as additional APIs for +Node.js-specific performance measurements. + +Node.js supports the following [Web Performance APIs][]: + +* [High Resolution Time][] +* [Performance Timeline][] +* [User Timing][] ```js const { PerformanceObserver, performance } = require('perf_hooks'); @@ -28,11 +33,14 @@ doSomeLongRunningProcess(() => { }); ``` -## Class: `Performance` +## `perf_hooks.performance` +An object that can be used to collect performance metrics from the current +Node.js instance. It is similar to [`window.performance`][] in browsers. + ### `performance.clearMarks([name])` -Provides timing details for Node.js itself. +_This property is an extension by Node.js. It is not available in Web browsers._ + +Provides timing details for Node.js itself. The constructor of this class +is not exposed to users. ### `performanceNodeTiming.bootstrapComplete` -Tracks the event loop delay at a given sampling rate. +Tracks the event loop delay at a given sampling rate. The constructor of +this class not exposed to users. + +_This property is an extension by Node.js. It is not available in Web browsers._ #### `histogram.disable()`