aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/window/performance/index.html
blob: 7f765838c84fa92f2c6b9aa16cde7712dc1e0d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: Window.performance
slug: Web/API/Window/performance
translation_of: Web/API/Window/performance
---
<div>{{APIREf}}</div>

<p>The Web Performance API allows web pages access to certain functions for measuring the performance of web pages and web applications, including the <a href="/en-US/docs/Navigation_timing">Navigation Timing </a>API and high-resolution time data.</p>

<h2 id="Methods" name="Methods">Methods</h2>

<dl>
 <dt>{{domxref("Performance.mark()", "performance.mark()")}}</dt>
 <dd>Maps a {{domxref("DOMHighResTimeStamp")}} to a specified name representing the amount of milliseconds elapsed since a reference instant.</dd>
</dl>

<dl>
 <dt>{{domxref("Performance.now()", "performance.now()")}}</dt>
 <dd>Возвращает {{domxref("DOMHighResTimeStamp")}} представляющий количество миллисекунд прошедшее с момента отсчёта.</dd>
 <dt><code>measure()</code></dt>
 <dd>This method stores the <a href="http://www.w3.org/TR/hr-time/#domhighrestimestamp"><code>DOMHighResTimeStamp</code></a> duration between two marks along with the associated name (a "measure").</dd>
 <dt><strong><code>getEntriesByType()</code></strong></dt>
 <dd> </dd>
 <dt><strong><code>getEntriesByType()</code></strong></dt>
 <dd> </dd>
 <dt><strong><code>getEntriesByName()</code></strong></dt>
 <dd> </dd>
 <dt><code>clearMarks()</code></dt>
 <dd>
 <p>If the markName argument is not specified, this method removes all marks and their associated DOMHighResTimeStamp time values.</p>

 <p>If the markName argument is specified, this method removes all DOMHighResTimeStamp time values for the given mark name.</p>

 <p>If the markName argument is specified but the specified markName does not exist, this method will do nothing.<br>
   </p>
 </dd>
</dl>

<h2 id="Properties" name="Properties">Properties</h2>

<dl>
 <dt>{{domxref("Performance.timing", "performance.timing")}}</dt>
 <dd>Is a {{domxref("PerformanceTiming")}} object containing latency-related performance information.</dd>
 <dt>{{domxref("Performance.navigation", "performance.navigation")}}</dt>
 <dd>Is a {{domxref("PerformanceNavigation")}} object representing the type of navigation that occurs in the given browsing context, like the amount of redirections needed to fetch the resource.</dd>
 <dt><a href="https://docs.webplatform.org/wiki/apis/timing/properties/memory">performance.memory</a></dt>
 <dd>A non-standard extension added in Chrome.</dd>
</dl>