On this page

C

PerformanceNodeEntry

History
class PerformanceNodeEntry extends PerformanceEntry

This class is an extension by Node.js. It is not available in Web browsers.

Provides detailed Node.js timing data.

The constructor of this class is not exposed to users directly.

Type:any

Additional detail specific to the entryType.

Stability: 0Deprecated: Use performanceNodeEntry.detail instead.
Type:number

When performanceEntry.entryType is equal to 'gc', the performance.flags property contains additional information about garbage collection operation. The value may be one of:

  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_NO
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_FORCED
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY
  • perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE
Stability: 0Deprecated: Use performanceNodeEntry.detail instead.
Type:number

When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies the type of garbage collection operation that occurred. The value may be one of:

  • perf_hooks.constants.NODE_PERFORMANCE_GC_MAJOR
  • perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR
  • perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP
  • perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL
  • perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB

When performanceEntry.type is equal to 'gc', the performanceNodeEntry.detail property will be an Object with two properties:

Attributes
kind:number
One of:
perf_hooks.constants.NODE_PERFORMANCE_GC_MAJOR:
perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR:
perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP:
perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL:
perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB:
flags:number
One of:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_NO:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_FORCED:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY:
perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE:

When performanceEntry.type is equal to 'http', the performanceNodeEntry.detail property will be an Object containing additional information.

If performanceEntry.name is equal to HttpClient, the detail will contain the following properties: req, res. And the req property will be an Object containing method, url, headers, the res property will be an Object containing statusCode, statusMessage, headers.

If performanceEntry.name is equal to HttpRequest, the detail will contain the following properties: req, res. And the req property will be an Object containing method, url, headers, the res property will be an Object containing statusCode, statusMessage, headers.

This could add additional memory overhead and should only be used for diagnostic purposes, not left turned on in production by default.

When performanceEntry.type is equal to 'http2', the performanceNodeEntry.detail property will be an Object containing additional performance information.

If performanceEntry.name is equal to Http2Stream, the detail will contain the following properties:

Attributes
bytesRead:number
The number of DATA frame bytes received for this Http2Stream.
bytesWritten:number
The number of DATA frame bytes sent for this Http2Stream.
The identifier of the associated Http2Stream
timeToFirstByte:number
The number of milliseconds elapsed between the PerformanceEntry startTime and the reception of the first DATA frame.
timeToFirstByteSent:number
The number of milliseconds elapsed between the PerformanceEntry startTime and sending of the first DATA frame.
timeToFirstHeader:number
The number of milliseconds elapsed between the PerformanceEntry startTime and the reception of the first header.

If performanceEntry.name is equal to Http2Session, the detail will contain the following properties:

Attributes
bytesRead:number
The number of bytes received for this Http2Session.
bytesWritten:number
The number of bytes sent for this Http2Session.
framesReceived:number
The number of HTTP/2 frames received by the Http2Session.
framesSent:number
The number of HTTP/2 frames sent by the Http2Session.
maxConcurrentStreams:number
The maximum number of streams concurrently open during the lifetime of the Http2Session.
pingRTT:number
The number of milliseconds elapsed since the transmission of a PING frame and the reception of its acknowledgment. Only present if a PING frame has been sent on the Http2Session.
streamAverageDuration:number
The average duration (in milliseconds) for all Http2Stream instances.
streamCount:number
The number of Http2Stream instances processed by the Http2Session.
type:string
Either 'server' or 'client' to identify the type of Http2Session.

When performanceEntry.type is equal to 'function', the performanceNodeEntry.detail property will be an Array listing the input arguments to the timed function.

When performanceEntry.type is equal to 'net', the performanceNodeEntry.detail property will be an Object containing additional information.

If performanceEntry.name is equal to connect, the detail will contain the following properties: host, port.

When performanceEntry.type is equal to 'dns', the performanceNodeEntry.detail property will be an Object containing additional information.

If performanceEntry.name is equal to lookup, the detail will contain the following properties: hostname, family, hints, verbatim, addresses.

If performanceEntry.name is equal to lookupService, the detail will contain the following properties: host, port, hostname, service.

If performanceEntry.name is equal to queryxxx or getHostByAddr, the detail will contain the following properties: host, ttl, result. The value of result is same as the result of queryxxx or getHostByAddr.