The standard defines a interface that supports client-side latency measurements within applications. The interfaces are considered because they are accurate to a thousandth of a millisecond (subject to hardware or software constraints). The interfaces support a number of use cases including calculating frame-rates (potentially important in animations) and benchmarking (such as the time to load a resource). High Resolution Time Performance Performance high resolution Since a platform's is subject to various (such as NTP adjustments), the interfaces support a i.e. a clock that is always increasing. As such, the API defines a type rather than using the interface. system clock skews monotonic clock Performance DOMHighResTimeStamp Date.now() DOMHighResTimeStamp The type, as its name implies, represents a high resolution point in time. This type is a and is used by the performance interfaces. The value could be a discrete point in time or the difference in time between two discrete points in time. DOMHighResTimeStamp double The unit of is milliseconds and should be accurate to 5 µs (microseconds). However, If the browser is unable to provide a time value accurate to 5 microseconds (because, for example, due to hardware or software constraints), the browser can represent a the value as a time in milliseconds accurate to a millisecond. DOMHighResTimeStamp Methods The interface has two methods. The method returns a whose value that depends on the and scope. If the scope is a window, the value is the time the browser context was created and if the scope is a , the value is the time the worker was created. Performance now() DOMHighResTimeStamp navigation start worker The method returns a serialization of the object, for those attributes that can be serialized. toJSON() Performance Properties The interface has two properties. The property returns a object containing latency-related performance information such as the start of navigation time, start and end times for redirects, start and end times for responses, etc. Performance timing PerformanceTiming The property returns a object representing the type of navigation that occurs in the given browsing context, such as the page was navigated to from history, the page was navigated to by following a link, etc. navigation PerformanceNavigation Interfaces Performance Provides methods and properties containing timing-related performance information for the given page. PerformanceEntry Provides methods and properties the encapsulate a single performance metric that is part of the performance timeline. PerformanceFrameTiming Provides methods and properties containing frame timing data about the browser's event loop. PerformanceMark An abstract interface for with an of " ". Entries of this type are created by calling to add a named (the mark) to the browser's performance timeline. performance entries entry type mark performance.mark() DOMHighResTimeStamp PerformanceMeasure An abstract interface for with an of " ". Entries of this type are created by calling to add a named (the measure) between two marks to the browser's performance timeline. performance entries entry type measure performance.measure() DOMHighResTimeStamp PerformanceNavigationTiming Provides methods and properties to store and retrieve or metrics regarding the browser's document navigation events. high resolution timestamps PerformanceObserver Provides methods and properties used to observe performance measurement events and be notified of new as they are recorded in the browser's performance timeline. performance entries PerformanceResourceTiming Provides methods and properties for retrieving and analyzing detailed network timing data regarding the loading of an application's resources. Specifications Implementation status As shown in the interface's table, most of these interfaces are broadly implemented by desktop browsers. Performance Browser Compatibility To test your browser's support for the interface, run the application. Performance perf-api-support See also A Primer for Web Performance Timing APIs Credits Source: https://developer.mozilla.org/en-US/docs/Web/API/Performance_API Published under licence Open CC Attribution ShareAlike 3.0