Perf Hooks
The performance object provides access to high-resolution timing.
Module:node:perf_hooks
Support: Experimental
Since: 1.1.0
Docs: Node.js Docs
10 members: 6 supported, 4 undocumented
Static Methods
Properties
The high-resolution millisecond timestamp at which the process started. @compat elide Full
Timing information about the Node.js process lifecycle. @compat elide Full
Interface PerformanceEntry
A single performance entry (mark or measure).
Since: 1.1.0 Docs: Node.js Docs6 members: 1 supported, 5 undocumented
Methods
Properties
A single performance entry (mark or measure).
The type of the entry: "mark", "measure", "node", "function", etc. @compat elide Full
The high-resolution timestamp when the entry was created. @compat elide Full
The high-resolution timestamp when the entry was created. @compat elide Full
The duration of the entry in milliseconds (0 for marks). @compat elide Full
---
Interface PerformanceMark
A user-defined performance mark created via performance.mark().
Constructors
---
Interface PerformanceMeasure
A user-defined performance measure created via performance.measure().
---
Interface PerformanceNodeTiming
Timing information about the Node.js process itself.
Extends: PerformanceEntry Since: 1.1.0 Docs: Node.js Docs7 members: 7 undocumented
Properties
Timestamp when the Node.js process completed bootstrapping. @compat elide Full
Timestamp when the V8 platform was initialized. @compat elide Full
Timestamp when the V8 platform was initialized. @compat elide Full
Timestamp when bootstrapping of the main module completed. @compat elide Full
Timestamp when the Node.js event loop started. @compat elide Full
Timestamp when the Node.js event loop exited. @compat elide Full
Cumulative idle time of the event loop in milliseconds. @compat elide Full
---
Interface PerformanceObserverEntryList
Provides a read-only list of PerformanceEntry objects delivered to an observer callback.
Since: 1.1.0 Docs: Node.js DocsMethods
---
Interface PerformanceObserver
Observes performance entry notifications and delivers them asynchronously via callback.
Since: 1.1.0 Docs: Node.js Docs5 members: 3 supported, 2 undocumented
Constructors
Methods
Properties
A frozen array of entry type strings supported by the implementation. @compat elide Full
---
Details
observe(options)
observe(options?: object)
observe(options?: object)
Start observing performance entries matching the given options.| Parameter | Type | Description |
|---|---|---|
options (optional) | object | Must contain either entryTypes (array) or type (string), not both. |
TypeError--- If bothentryTypesandtypeare present, or neither is.- DOMException --- InvalidModificationError if switching between entryTypes and type modes.
---
Callback PerformanceObserverCallback
---