--- title: PerformanceEntry slug: Web/API/PerformanceEntry translation_of: Web/API/PerformanceEntry ---
PerformanceEntry
객체는 performance timeline 상의 단일 성능 수치를 캡슐화 합니다. performance entry는 응용프로그램의 특정 지점에서 performance {{domxref("PerformanceMark","mark")}}나 {{domxref("PerformanceMeasure","measure")}}를 생성함으로써 (예를 들면 {{domxref("Performance.mark","mark()")}}를 호출하는 방법으로) 직접적으로 만들어질 수 있습니다. 또는 (이미지와 같은) 리소스를 로딩하는 등의 간접적인 방법으로 생성되기도 합니다.
PerformanceEntry
인스턴스는 항상 다음 서브타입들 중 하나를 따릅니다:
{{AvailableInWorkers}}
mark
". See property page for valid values.PerformanceEntry
object.The following example checks all PerformanceEntry
properties to see if the browser supports them and if so, write their values to the console.
function print_PerformanceEntries() { // Use getEntries() to get a list of all performance entries var p = performance.getEntries(); for (var i=0; i < 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 < properties.length; i++) { // Check each property 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"); } } }
Specification | Status | Comment |
---|---|---|
{{SpecName('Resource Timing 3')}} | {{Spec2('Resource Timing 3')}} | |
{{SpecName('Resource Timing 2')}} | {{Spec2('Resource Timing 2')}} | |
{{SpecName('Resource Timing')}} | {{Spec2('Resource Timing')}} | Adds the {{domxref("PerformanceResourceTiming")}} interface and the resource value for entryType . |
{{SpecName('Navigation Timing Level 2')}} | {{Spec2('Navigation Timing Level 2')}} | |
{{SpecName('Navigation Timing')}} | {{Spec2('Navigation Timing')}} | Adds the {{domxref("PerformanceNavigationTiming")}} interface and the navigation value for entryType . |
{{SpecName('User Timing Level 2')}} | {{Spec2('User Timing Level 2')}} | |
{{SpecName('User Timing')}} | {{Spec2('User Timing')}} | Adds the {{domxref("PerformanceMark")}} and {{domxref("PerformanceMeasure")}} interfaces as well as the mark and measure values for entryType . |
{{SpecName('Frame Timing')}} | {{Spec2('Frame Timing')}} | Adds the {{domxref('PerformanceFrameTiming')}} interface and the frame value for entryType . |
{{SpecName('Performance Timeline Level 2', '#dom-performanceentry', 'PerformanceEntry')}} | {{Spec2('Performance Timeline Level 2')}} | Added toJSON() serializer method. |
{{SpecName('Performance Timeline', '#dom-performanceentry', 'PerformanceEntry')}} | {{Spec2('Performance Timeline')}} | Initial definition. |
{{Compat("api.PerformanceEntry")}}