aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/performanceentry/index.html
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/ja/web/api/performanceentry/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/performanceentry/index.html')
-rw-r--r--files/ja/web/api/performanceentry/index.html149
1 files changed, 149 insertions, 0 deletions
diff --git a/files/ja/web/api/performanceentry/index.html b/files/ja/web/api/performanceentry/index.html
new file mode 100644
index 0000000000..da7c5949a2
--- /dev/null
+++ b/files/ja/web/api/performanceentry/index.html
@@ -0,0 +1,149 @@
+---
+title: PerformanceEntry
+slug: Web/API/PerformanceEntry
+tags:
+ - API
+ - PerformanceEntry
+ - Web パフォーマンス
+ - インターフェイス
+ - パフォーマンスタイムライン API
+ - リファレンス
+translation_of: Web/API/PerformanceEntry
+---
+<div>{{APIRef("Performance Timeline API")}}</div>
+
+<p><span class="seoSummary"><strong><code>PerformanceEntry</code></strong> オブジェクトは、<em>パフォーマンスタイムライン</em>の一部である単一のパフォーマンスメトリックをカプセル化します。パフォーマンスエントリは、アプリケーション内の明示的な時点でパフォーマンス <em>{{domxref("PerformanceMark","mark")}}</em> または <em>{{domxref("PerformanceMeasure","measure")}}</em> を作成する (たとえば、{{domxref("Performance.mark","mark()")}} メソッドを呼び出すことによって) ことで直接作成できます。パフォーマンスエントリは、(イメージなどの) リソースのロードなどの間接的な方法でも作成されます。</span></p>
+
+<p><code>PerformanceEntry</code> インスタンスは常に次のサブタイプのいずれかになります:</p>
+
+<ul>
+ <li>{{domxref("PerformanceMark")}}</li>
+ <li>{{domxref("PerformanceMeasure")}}</li>
+ <li>{{domxref("PerformanceFrameTiming")}}</li>
+ <li>{{domxref("PerformanceNavigationTiming")}}</li>
+ <li>{{domxref("PerformanceResourceTiming")}}</li>
+ <li>{{domxref("PerformancePaintTiming")}}</li>
+</ul>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="プロパティ">プロパティ</h2>
+
+<dl>
+ <dt>{{domxref("PerformanceEntry.name")}} {{readonlyInline}}</dt>
+ <dd>{{domxref("PerformanceEntry.entryType")}} プロパティによって返される値をさらに指定する値。両方の値はサブタイプによって異なります。有効な値についてはプロパティページを参照してください。</dd>
+ <dt>{{domxref("PerformanceEntry.entryType")}} {{readonlyInline}}</dt>
+ <dd>たとえば、"<code>mark</code>" などのパフォーマンスメトリックの種類を表す {{domxref("DOMString")}}。有効な値についてはプロパティページを参照してください。</dd>
+ <dt>{{domxref("PerformanceEntry.startTime")}} {{readonlyInline}}</dt>
+ <dd>パフォーマンスメトリックの開始時間を表す {{domxref("DOMHighResTimeStamp")}}。</dd>
+ <dt>{{domxref("PerformanceEntry.duration")}} {{readonlyInline}}</dt>
+ <dd>パフォーマンスイベントの期間の時間値を表す {{domxref("DOMHighResTimeStamp")}}。</dd>
+</dl>
+
+<h2 id="メソッド">メソッド</h2>
+
+<dl>
+ <dt>{{domxref("PerformanceEntry.toJSON","PerformanceEntry.toJSON()")}}</dt>
+ <dd><code>PerformanceEntry</code> オブジェクトの JSON リプリゼンテーションを返します。</dd>
+</dl>
+
+<h2 id="例">例</h2>
+
+<p>次の例では、すべての <code>PerformanceEntry</code> プロパティを調べて、ブラウザがそれらをサポートしているかどうかを確認し、サポートしている場合はそれらの値をコンソールに書き込みます。</p>
+
+<pre class="brush: js">function print_PerformanceEntries() {
+ // getEntries() を使用してすべてのパフォーマンスエントリのリストを取得します。
+ var p = performance.getEntries();
+ for (var i=0; i &lt; p.length; i++) {
+ console.log("PerformanceEntry[" + i + "]");
+ print_PerformanceEntry(p[i]);
+ }
+}
+function print_PerformanceEntry(perfEntry) {
+ var properties = ["name",
+ "entryType",
+ "startTime",
+ "duration"];
+
+ for (var i=0; i &lt; properties.length; i++) {
+ // それぞれのプロパティをチェックします。
+ var supported = properties[i] in perfEntry;
+ if (supported) {
+ var value = perfEntry[properties[i]];
+ console.log("... " + properties[i] + " = " + value);
+ } else {
+ console.log("... " + properties[i] + " is NOT supported");
+ }
+ }
+}
+</pre>
+
+<h2 id="仕様">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">ステータス</th>
+ <th scope="col">コメント</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Resource Timing 3')}}</td>
+ <td>{{Spec2('Resource Timing 3')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Resource Timing 2')}}</td>
+ <td>{{Spec2('Resource Timing 2')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Resource Timing')}}</td>
+ <td>{{Spec2('Resource Timing')}}</td>
+ <td>{{domxref("PerformanceResourceTiming")}} インターフェイスと <code>entryType</code> の <code>resource</code> 値を追加します。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Navigation Timing Level 2')}}</td>
+ <td>{{Spec2('Navigation Timing Level 2')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Navigation Timing')}}</td>
+ <td>{{Spec2('Navigation Timing')}}</td>
+ <td>{{domxref("PerformanceNavigationTiming")}} インターフェイスと <code>entryType</code> の <code>navigation</code> 値を追加します。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('User Timing Level 2')}}</td>
+ <td>{{Spec2('User Timing Level 2')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('User Timing')}}</td>
+ <td>{{Spec2('User Timing')}}</td>
+ <td><code>entryType</code> の <code>mark</code> および <code>measure</code> の値と同様に、{{domxref("PerformanceMark")}} および {{domxref("PerformanceMeasure")}} インターフェイスを追加します。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Frame Timing')}}</td>
+ <td>{{Spec2('Frame Timing')}}</td>
+ <td>{{domxref('PerformanceFrameTiming')}} インターフェイスと <code>entryType</code> の <code>frame</code> 値を追加します。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Performance Timeline Level 2', '#dom-performanceentry', 'PerformanceEntry')}}</td>
+ <td>{{Spec2('Performance Timeline Level 2')}}</td>
+ <td><code>toJSON()</code> シリアライザメソッドを追加しました。</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Performance Timeline', '#dom-performanceentry', 'PerformanceEntry')}}</td>
+ <td>{{Spec2('Performance Timeline')}}</td>
+ <td>初期定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザの互換性">ブラウザの互換性</h2>
+
+<div>
+<div class="hidden">このページの互換性テーブルは構造化データから生成されます。データに貢献したい場合は <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックして、プルリクエストを送ってください。</div>
+
+<p>{{Compat("api.PerformanceEntry")}}</p>
+</div>