1 of 8

User Timing L3

philipwalton@chromium.org, tdresser@chromium.org, TPAC 2017

2 of 8

Objectives

  • Enable performance.measure across arbitrary timestamps
    • Compute measures requiring complex logic to compute timestamps.
    • Correlate timestamps from other sources: e.g., event timestamp to resource load end.
  • Enable reporting arbitrary metadata
    • Provide rich data to analytics via a standardized API

3 of 8

Lack of Custom Timestamps causes developer pain: Example from airbnb

TTI Polyfill Output

4 of 8

Custom Timestamps

5 of 8

Custom Metadata

6 of 8

Custom Metadata

7 of 8

Custom Metadata

This is equivalent to the approach taken for CustomEvents.

8 of 8

Alternatively, getting a bit fancier...

We could:

  • Create separate options interfaces for mark & measure
  • Include start & duration in the options object
  • Allow passing the options object as the second parameter.
  • performance.measure(“test”, {startMark:a, duration:b, detail:{}});