aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/performance_property
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-09-30 00:53:33 +0000
committerMDN <actions@users.noreply.github.com>2021-09-30 00:53:33 +0000
commit9a06d5b4a3874caa094bff06895c892914eaea93 (patch)
tree1c9549ade620e59f4af4c5ee6b6ac7640bf4fcda /files/zh-cn/web/api/performance_property
parent75e5dcce1e3c6558a3a2d3def5c08669404587c4 (diff)
downloadtranslated-content-9a06d5b4a3874caa094bff06895c892914eaea93.tar.gz
translated-content-9a06d5b4a3874caa094bff06895c892914eaea93.tar.bz2
translated-content-9a06d5b4a3874caa094bff06895c892914eaea93.zip
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/web/api/performance_property')
-rw-r--r--files/zh-cn/web/api/performance_property/index.html36
1 files changed, 36 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/performance_property/index.html b/files/zh-cn/web/api/performance_property/index.html
new file mode 100644
index 0000000000..7771c6cb0b
--- /dev/null
+++ b/files/zh-cn/web/api/performance_property/index.html
@@ -0,0 +1,36 @@
+---
+title: Window.performance
+slug: Web/API/performance_property
+tags:
+ - Window.performance
+ - analytics
+ - 前端代码埋点
+translation_of: Web/API/Window/performance
+original_slug: Web/API/Window/performance
+---
+<div>{{APIREf}}</div>
+
+<div>Web Performance API允许网页访问某些函数来测量网页和Web应用程序的性能,包括 <a href="/en-US/docs/Navigation_timing">Navigation Timing</a> API和高分辨率时间数据。</div>
+
+<h2 id="Methods" name="Methods">方法</h2>
+
+<dl>
+ <dt>{{domxref("Performance.mark()", "performance.mark()")}}</dt>
+ <dd>通过一个给定的名称,将该名称(作为键)和对应的{{domxref("DOMHighResTimeStamp")}}(作为值)保存在一个哈希结构里。该键值对表示了从某一时刻(译者注:某一时刻通常是 navigationStart 事件发生时刻)到记录时刻间隔的毫秒数。(译者注:该方法一般用来多次记录时间,用于求得各记录间的时间差)</dd>
+</dl>
+
+<dl>
+ <dt>{{domxref("Performance.now()", "performance.now()")}}</dt>
+ <dd>该方法返回一个{{domxref("DOMHighResTimeStamp")}}对象,该对象表示从某一时刻(译者注:某一时刻通常是 navigationStart 事件发生时刻)到调用该方法时刻的毫秒数。</dd>
+</dl>
+
+<h2 id="Properties" name="Properties">属性</h2>
+
+<dl>
+ <dt>{{domxref("Performance.timing", "performance.timing")}}</dt>
+ <dd>是一个{{domxref("PerformanceTiming")}} 对象,包含延迟相关的性能信息。</dd>
+ <dt>{{domxref("Performance.navigation", "performance.navigation")}}</dt>
+ <dd>是一个 {{domxref("PerformanceNavigation")}} 对象,该对象表示在当前给定浏览上下文中网页导航的类型(译者注:TYPE_BACK_FORWARD,TYPE_NAVIGATE, TYPE_RELOAD,TYPE_RESERVED)以及次数。</dd>
+ <dt><a href="https://docs.webplatform.org/apis/timing/properties/memory">performance.memory</a></dt>
+ <dd>在Chrome中添加的一个非标准扩展。</dd>
+</dl>