w3c / charter-webperf

Web Performance Group charter
https://w3c.github.io/charter-webperf/
27 stars 11 forks source link

Enable developers to create and queue custom PerformanceEntry objects #28

Closed igrigorik closed 6 years ago

igrigorik commented 8 years ago

(discussed at TPAC 2016; rough notes and summary of discussed ideas below)

User Timing provides a simple interface to create marks and measures. However, you can only customize the name, which limits its usefulness and flexibility: some developers have resorted to encoding complex values into the name (e.g. traceviewer), and we've had past requests to allow passing additional structured metadata via User Timing (see https://github.com/w3c/user-timing/issues/3).


Question: can (should we?) allow more developer control over creation of PerformanceEntries?

We could define a mechanism to create custom PerformanceEntries with arbitrary properties...

image

igrigorik commented 7 years ago

A proof-of-concept polyfill by @tdresser: https://github.com/tdresser/input-latency-web-perf-polyfill/blob/gh-pages/performance_timeline_emit.js

tdresser commented 7 years ago

I've drafted a rough proposal here.

igrigorik commented 6 years ago

This is being incubated in: https://github.com/WICG/performance-entry. Let's direct any further discussions and comments to the WICG repo. Closing.