User Timing Level 2 (original) (raw)

Abstract

This specification defines an interface to help web developers measure the performance of their applications by giving them access to high precision timestamps.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

User Timing Level 2 replaces the first version of [USER-TIMING] and includes:

This document was published by the Web Performance Working Group as a First Public Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, the GitHub repository is preferred for discussion of this specification. There is also a public mailing list public-web-perf@w3.org (archives). When sending e-mail, please use [UserTiming] at the start of your email's subject. All comments are welcome.

Publication as a First Public Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the5 February 2004 W3C Patent Policy.W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes containsEssential Claim(s) must disclose the information in accordance withsection 6 of the W3C Patent Policy.

This document is governed by the 1 September 2015 W3C Process Document.

Table of Contents

  1. 1. Introduction
  2. 2. Conformance
  3. 3. Extensions to the Performance Interface
  4. 4. The PerformanceMark Interface
  5. 5. The PerformanceMeasure Interface
  6. 6. Privacy and Security
  7. A. Acknowledgments
  8. B. References
    1. B.1 Normative references
    2. B.2 Informative references

1. Introduction

This section is non-normative.

Web developers need the ability to assess and understand the performance characteristics of their applications. While JavaScript provides a mechanism to measure application latency (retrieving the current timestamp from the Date.now() method), the precision of this timestamp varies between user agents.

This document defines the PerformanceMark andPerformanceMeasure interfaces, and extensions to thePerformance interface, which expose a high precision, monotonically increasing timestamp so they can better measure the performance characteristics of their applications.

The following script shows how a developer can use the interfaces defined in this document to obtain timing data related to developer scripts.

Example 1

User Timing example