--- title: Performance slug: Web/API/Performance tags: - API - Interface - Navigation Timing - NeedsTranslation - Performance - Reference - TopicStub - Web Performance translation_of: Web/API/Performance ---
The Performance
interface represents timing-related performance information for the given page.
An object of this type can be obtained by calling the {{domxref("Window.performance")}} read-only attribute.
Note: This interface and its members are available in Web Workers, except where indicated below. Note that some available parts of the interface are not yet documented (see the Performance Timeline and User Timing specs for more details.) Also note that performance markers and measures are per context. If you create a mark on the main thread (or other worker), you cannot see it in a worker thread, and vice versa.
The Performance
interface doesn't inherit any properties.
The Performance
interface doesn't inherit any method.
resource
" from the browser's performance data buffer.resource
" {{domxref("PerformanceEntry.entryType","type")}} {{domxref("PerformanceEntry","performance entry")}} objects.Performance
object.Specification | Status | Comment |
---|---|---|
{{SpecName('Highres Time Level 2', '#the-performance-interface', 'toJSON()')}} | {{Spec2('Highres Time Level 2')}} | Defines toJson() method. |
{{SpecName('Highres Time', '#the-performance-interface', 'Performance')}} | {{Spec2('Highres Time')}} | Defines now() method. |
{{SpecName('Navigation Timing', '#sec-window.performance-attribute', 'Performance')}} | {{Spec2('Navigation Timing')}} | Defines timing and navigation properties. |
{{SpecName('Performance Timeline Level 2', '#extensions-to-the-performance-interface', 'Performance extensions')}} | {{Spec2('Performance Timeline Level 2')}} | Changes getEntries() interface. |
{{SpecName('Performance Timeline', '#sec-window.performance-attribute', 'Performance extensions')}} | {{Spec2('Performance Timeline')}} | Defines getEntries() , getEntriesByType() and getEntriesByName() methods. |
{{SpecName('Resource Timing', '#extensions-performance-interface', 'Performance extensions')}} | {{Spec2('Resource Timing')}} | Defines clearResourceTimings() and setResourceTimingBufferSize() methods and the onresourcetimingbufferfull property. |
{{SpecName('User Timing Level 2', '#extensions-performance-interface', 'Performance extensions')}} | {{Spec2('User Timing Level 2')}} | Clarifies mark() , clearMark() , measure() and clearMeasure() methods. |
{{SpecName('User Timing', '#extensions-performance-interface', 'Performance extensions')}} | {{Spec2('User Timing')}} | Defines mark() , clearMark() , measure() and clearMeasure() methods. |
{{SpecName('Frame Timing', '#extensions-performance-interface','Performance extensions')}} | {{Spec2('User Timing')}} | Defines clearFrameTimings() , setFrameTimingBufferSize() , and onframetimingbufferfull methods. |
{{Compat("api.Performance")}}