aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/console/profileend
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/console/profileend
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/console/profileend')
-rw-r--r--files/zh-cn/web/api/console/profileend/index.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/console/profileend/index.html b/files/zh-cn/web/api/console/profileend/index.html
new file mode 100644
index 0000000000..6e1bb6ece9
--- /dev/null
+++ b/files/zh-cn/web/api/console/profileend/index.html
@@ -0,0 +1,46 @@
+---
+title: Console.profileEnd()
+slug: Web/API/Console/profileEnd
+translation_of: Web/API/Console/profileEnd
+---
+<p>{{APIRef("Console API")}}{{Non-standard_header}}</p>
+
+<div class="warning">
+<p>在 console.profile() 之后立刻调用此API可能会导致其无法工作.。为解决此问题,请在setTimeOut中至少延迟5毫秒后再调用。 请看 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1173588">bug #1173588</a>。</p>
+</div>
+
+<p>profileEnd方法会停止记录之前已经由{{domxref("Console.profile()")}}开始记录的性能描述信息</p>
+
+<p>你可以选择提供一个参数来命名需要记录的描述信息。这使得你在记录多个描述信息的时候可以停止记录特定的描述信息。</p>
+
+<ul>
+ <li><code><font face="Open Sans, arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">如果 </span></font>Console.profileEnd()</code> 传了描述信息名字,并且它与正在记录的描述信息的名字相匹配,则此描述信息将会停止。</li>
+ <li><code><font face="Open Sans, arial, x-locale-body, sans-serif">如果 </font>Console.profileEnd()</code> 传了描述信息名字,并且它与正在记录的描述信息的名字不匹配,则不会进行更改。</li>
+ <li><code><font face="Open Sans, arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">如果 </span></font>Console.profileEnd()</code> 没有传描述信息名字,最近启动记录的描述信息将会停止。</li>
+</ul>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">console.profileEnd(<em>profileName</em>);
+</pre>
+
+<h2 id="参数">参数</h2>
+
+<dl>
+ <dt><code>profileName</code></dt>
+ <dd>描述信息的名字。可选。</dd>
+</dl>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.Console.profileEnd")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{domxref("Console.profile()")}}</li>
+</ul>