Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMetric<T>

Data captured for a specific metric name.

The common fields present for all metrics exist in this interface with the entries being an array of a type that extends IPerformanceEntry

Type parameters

Hierarchy

  • IMetric

Index

Properties

averageDuration

averageDuration: number

The average duration (in milliseconds) of each entry present IMetric.entries.

calls

calls: number

The total number of IMetric.entries captured.

entries

entries: T[]

Collection of all metrics entries captured for the IMetric.name within a specific group (e.g function metrics, measurement metrics, etc).

Some metrics may be an instance of a Node PerformanceEntry. For information about those formats, see the Node documentation linked.

name

name: string

The name of the metric.

This name is guaranteed to be unique within a measurement group. When a metric generation function is called in PerformanceApi, the name of the metric will be used as a lookup key to see if the new measurement should be aggregated with previous measurements.

totalDuration

totalDuration: number

The total time (in milliseconds) represented by the sum of the durations of each entry within IMetric.entries.

Generated using TypeDoc