HubSpot / BuckyClient

Collect performance data from the client

Home Page:http://github.hubspot.com/bucky

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Align with Performance API Candidate Specs

zackbloom opened this issue · comments

They are candidate specs, but they've landed in Chrome, so I'd like to align Bucky with the new specs:

http://www.w3.org/TR/performance-timeline/
http://www.w3.org/TR/resource-timing/
http://www.w3.org/TR/user-timing/

It's very exciting because it means A. we have access to the timing data of everything on the page, and B. we have a standard (if cumbersome) API to standardize how manual timing is done.

I don't believe there is an event fired when a new timing is added to performance.getEntries(), so my guess is that the best we can do is create a method which will push all new performance entries to the server. We could run that method periodically to pickup the new entries.

In browsers which support this, we might be able to eliminate the timing aspects of the XMLHttpRequest hook. The new API is pretty protective about leaking information about cross origin requests, so it may not be an adequate replacement for those requests.