Intent to Implement and Ship: PerformanceObserver takeRecords()

68 views
Skip to first unread message

n...@chromium.org

unread,
Jan 15, 2018, 3:40:26 PM1/15/18
to blink-dev

Contact emails

n...@chromium.org, igri...@chromium.org


Explainer

https://github.com/w3c/performance-timeline/issues/74

More discussion at https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/progressive-web-metrics/nLcOw4gN9wc/Gic_NddNAwAJ


Spec

https://w3c.github.io/performance-timeline/#takerecords-method


Summary

The takeRecords method returns a copy of the performance entries in the PerformanceObserver’s buffer, and also clears this buffer. This aligns PerformanceObserver with other *Observer implementations, like MutationObserver and IntersectionObservers, which have similar methods.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Debuggability

Available in console.


Risks

Interoperability and Compatibility

Low. It's a new feature and it aligns PerformanceObserver with other *Observer APIs.

Edge: public support (https://github.com/w3c/performance-timeline/pull/98#issuecomment-356051848)

Safari: public support (https://github.com/w3c/performance-timeline/pull/98#issuecomment-356130841)

Firefox: no signals


Ergonomics

This API is improves ergonomics. It would currently be complicated to simulate flushing the PerformanceObserver and obtaining its current entries (and certain preprocessing would be needed ahead of time).


Activation

This API is easy to use. In most cases, we expect this API to be used to provide more data to analytics. If this API isn't present, some data produced before disconnecting the observer or unloading the page won't be reported. No additional logic will be required to handle these cases.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

There is a test at:

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/po-takeRecords.html



Entry on the feature dashboard

Fits under existing Performance Observer entry: https://www.chromestatus.com/feature/5945504202489856


Philip Jägenstedt

unread,
Jan 16, 2018, 9:48:24 AM1/16/18
to n...@chromium.org, blink-dev
Makes good sense, LGTM1!

Thanks for adding the test, I see it was a recent addition by you :)

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3318ed53-6576-4b35-8c13-d5741e0bce1b%40chromium.org.

Joe Medley

unread,
Jan 16, 2018, 10:58:17 AM1/16/18
to n...@chromium.org, blink-dev
Actually this does need its own entry. Can you please add one? As you can see from this entry, it's what we usually do. Developer need to be able to find and star a tracking bug (among other things) and we don't want to lose the PerformanceObserver history by writing over it.

Joe

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Rick Byers

unread,
Jan 16, 2018, 11:08:14 AM1/16/18
to Philip Jägenstedt, n...@chromium.org, blink-dev

n...@chromium.org

unread,
Jan 16, 2018, 11:20:32 AM1/16/18
to blink-dev, n...@chromium.org
Hm well I'm also the owner of the entry you linked, so I'm not sure that's a good argument for what 'we' usually do. Created entry: https://www.chromestatus.com/feature/5176567353311232.

Joe Medley

unread,
Jan 16, 2018, 12:56:53 PM1/16/18
to n...@chromium.org, blink-dev
DevRel's intent in building Chrome Status was to communicate with developers. Reusing an existing entry either doesn't communicate at all (in the case of an unchanged entry) or communicates at the expense of obliterating old information some may still find useful. I frequently use it as a simple way to gain access to the development history when I need to verify something that's on caniuse or MDN.

Please create a new entry.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

Joe Medley

unread,
Jan 16, 2018, 12:57:02 PM1/16/18
to n...@chromium.org, blink-dev
It does not take that long.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

n...@chromium.org

unread,
Jan 16, 2018, 12:59:52 PM1/16/18
to blink-dev, n...@chromium.org
As I said in my previous post, I have created a new entry. It is at https://www.chromestatus.com/feature/5176567353311232.

Joe Medley

unread,
Jan 16, 2018, 1:02:48 PM1/16/18
to n...@chromium.org, blink-dev
Thank you.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

Ojan Vafai

unread,
Jan 16, 2018, 9:36:48 PM1/16/18
to Joe Medley, n...@chromium.org, blink-dev

Lgtm3


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
Reply all
Reply to author
Forward
0 new messages