diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/performance_timeline/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/ja/web/api/performance_timeline/index.html')
-rw-r--r-- | files/ja/web/api/performance_timeline/index.html | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/files/ja/web/api/performance_timeline/index.html b/files/ja/web/api/performance_timeline/index.html new file mode 100644 index 0000000000..b006e32da1 --- /dev/null +++ b/files/ja/web/api/performance_timeline/index.html @@ -0,0 +1,74 @@ +--- +title: パフォーマンスタイムライン +slug: Web/API/Performance_Timeline +tags: + - Web パフォーマンス + - ガイド + - 概要 +translation_of: Web/API/Performance_Timeline +--- +<div>{{DefaultAPISidebar("Performance Timeline API")}}</div> + +<p><strong>パフォーマンスタイムライン</strong> API は、{{domxref("Performance")}} インターフェイスへの拡張を定義して、アプリケーション内のクライアントサイドの待ち時間の測定をサポートします。 拡張機能は、特定のフィルタ基準に基づいて{{domxref("PerformanceEntry","performance entry metrics", '', 'true')}} を取得するためのインターフェイスを提供します。この規格には、特定のパフォーマンスイベントがブラウザのパフォーマンスタイムラインに追加されたときに通知される <em>{{anch("Performance_Observers","performance observer", '', 'true')}}</em> コールバックをアプリケーションで定義できるインターフェイスも含まれます。</p> + +<p>このドキュメントは規格のインターフェイスの概要を提供します。インターフェイスの詳細については、リファレンスページおよび<a href="/ja/Web/API/Performance_Timeline/Using_Performance_Timeline">パフォーマンスタイムラインの使用</a>を参照してください。</p> + +<h2 id="Performance_拡張">Performance 拡張</h2> + +<p>パフォーマンスタイムライン API は、{{domxref("Performance")}} インターフェイスを、指定されたフィルター基準に応じて一連の {{domxref("PerformanceEntry","パフォーマンスレコード (メトリック)")}} を取得するためのさまざまなメカニズムを提供する3つのメソッドで拡張します。メソッドは以下のとおりです。</p> + +<dl> + <dt>{{domxref("Performance.getEntries","getEntries()")}}</dt> + <dd>Returns all recorded {{domxref("PerformanceEntry","performance entries")}} or, optionally, the entries based on the specified {{domxref("PerformanceEntry.name","name")}}, {{domxref("PerformanceEntry.entryType","performance type")}} and/or the {{domxref("PerformanceEntry.initiatorType","initiatorType")}} (such as an HTML element).</dd> + <dt>{{domxref("Performance.getEntriesByName","getEntriesByName()")}}</dt> + <dd>Returns the recorded {{domxref("PerformanceEntry","performance entries")}} based on the specified {{domxref("PerformanceEntry.name","name")}} and optionally the {{domxref("PerformanceEntry.entryType","performance type")}}.</dd> + <dt>{{domxref("Performance.getEntriesByType","getEntriesByType()")}}</dt> + <dd>Returns the recorded {{domxref("PerformanceEntry","performance entries")}} based on the specified {{domxref("PerformanceEntry.entryType","performance type")}}.</dd> +</dl> + +<h2 id="PerformanceEntry_インターフェイス">PerformanceEntry インターフェイス</h2> + +<p>The {{domxref("PerformanceEntry")}} interface encapsulates a single <em>performance entry</em> — that is, a single data point or metric in the <em>performance timeline</em>. This interface has the following four properties, and these properties are extended (with additional constraints) by other interfaces (such as {{domxref("PerformanceMark")}}):</p> + +<dl> + <dt>{{domxref("PerformanceEntry.name","name")}}</dt> + <dd>The name of the performance entry when the metric was created.</dd> + <dt>{{domxref("PerformanceEntry.entryType","entryType")}}</dt> + <dd>The type of performance metric (for example, "<code>mark</code>").</dd> + <dt>{{domxref("PerformanceEntry.startTime","startTime")}}</dt> + <dd>A {{domxref("DOMHighResTimeStamp","high resolution timestamp")}} representing the starting time for the performance entry.</dd> + <dt>{{domxref("PerformanceEntry.duration","duration")}}</dt> + <dd>A {{domxref("DOMHighResTimeStamp","high resolution timestamp", '', 'true')}} representing the time value of the duration of the performance event. (Some performance {{domxref("PerformanceEntry.entryType","entry types", '', 'true')}} have no concept of <em>duration</em> and this value is set to <code>'0'</code> for such types.)</dd> +</dl> + +<p>This interface includes a {{domxref("PerformanceEntry.toJSON","toJSON()")}} method that returns the serialization of the {{domxref("PerformanceEntry")}} object. The serialization is specific to the performance entry's {{domxref("PerformanceEntry.entryType","type")}}.</p> + +<h2 id="Performance_オブザーバー">Performance オブザーバー</h2> + +<p>{{SeeCompatTable}}</p> + +<p>The <em>performance observer</em> interfaces allow an application to register an <em>observer</em> for specific performance event types, and when one of those event types is recorded, the application is <em>notified</em> of the event via the observer's callback function that was specified when the observer was created.</p> + +<p>When the observer (callback) is invoked, the callback's parameters include a <em>{{domxref("PerformanceObserverEntryList","performance observer entry list")}}</em> that contains only <em>observed</em> {{domxref("PerformanceEntry","performance entries")}}. That is, the list contains entries only for the event types that were specified when the observer's {{domxref("PerformanceObserver.observe","observe()")}} method was invoked. The {{domxref("PerformanceObserverEntryList","performance observer entry list")}} interface has the same three <code>getEntries*()</code> methods as the {{domxref("Performance")}} interface. However, note there is one key difference with these methods; the {{domxref("PerformanceObserverEntryList","performance observer entry list")}} versions are used to retrieve <em>observed</em> performance entries within the observer callback.</p> + +<p>Besides the {{domxref("PerformanceObserver","PerformanceObserver's")}} interface's {{domxref("PerformanceObserver.observe","observe()")}} method (which is used to register the {{domxref("PerformanceEntry.entryType","entry types")}} to <em>observe</em>), the {{domxref("PerformanceObserver")}} interface also has a {{domxref("PerformanceObserver.disconnect","disconnect()")}} method that stops an observer from receiving further events.</p> + +<p class="note">Performance observers were added to the <code>Level 2</code> version of the standard and were not widely implemented.</p> + +<h2 id="実装状況">実装状況</h2> + +<p>A summary of the interfaces' implementation status is provided below, including a link to more detailed information.</p> + +<ul> + <li>Performance interface extensions: As shown in the {{domxref("Performance")}} interface's <a href="/Web/API/Performance#Browser_compatibility">Browser Compatibility</a> table, most of these interfaces are broadly implemented by desktop browsers and have less support on mobile devices.</li> + <li>PerformanceEntry: As shown in the {{domxref("PerformanceEntry")}} interface's <a href="/Web/API/PerformanceEntry#Browser_compatibility">Browser Compatibility</a> table, most of these interfaces are broadly implemented by desktop browsers and have less support on mobile devices.</li> + <li>Performance Observers {{experimental_inline}}: As shown in the {{domxref("PerformanceObserver")}} interface's <a href="/Web/API/PerformanceObserver#Browser_compatibility">Browser Compatibility</a> table, this interface has no shipping implementations.</li> +</ul> + +<p>To test your browser's support for these interfaces, run the <code><a href="http://mdn.github.io/web-performance/perf-api-support.html">perf-api-support</a></code> application.</p> + +<h2 id="あわせて参照">あわせて参照</h2> + +<ul> + <li><a href="http://siusin.github.io/perf-timing-primer/">A Primer for Web Performance Timing APIs</a></li> +</ul> |