Note: This feature is available in Web Workers.
The PerformanceEntry
object encapsulates a single performance metric that is part of the browser's performance timeline.
The Performance API offers built-in metrics which are specialized subclasses of PerformanceEntry
. This includes entries for resource loading, event timing, first input delay (FID), and more.
A performance entry can also be created by calling the Performance.mark()
or Performance.measure()
methods at an explicit point in an application. This allows you to add your own metrics to the performance timeline.
The PerformanceEntry
instances will always be one of the following subclasses:
LargestContentfulPaint
LayoutShift
PerformanceEventTiming
PerformanceLongAnimationFrameTiming
PerformanceLongTaskTiming
PerformanceMark
PerformanceMeasure
PerformanceNavigationTiming
PerformancePaintTiming
PerformanceResourceTiming
PerformanceScriptTiming
PerformanceServerTiming
TaskAttributionTiming
VisibilityStateEntry