Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine navigationStart as fallback timeOrigin #38

Open
paulirish opened this issue Feb 3, 2017 · 2 comments
Open

Determine navigationStart as fallback timeOrigin #38

paulirish opened this issue Feb 3, 2017 · 2 comments

Comments

@paulirish
Copy link
Owner

Currently 0 time is selected as the first timestamp found in the trace. However this will skew results the more that there's a gap between tracing started and navigation started.

Ideally we should find the navigationStart in the trace if a timeOrigin is not provided in the options.
Doing that is fairly straightforward:

https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/gather/computed/trace-of-tab.js#L53-L67

@brendankenny
Copy link
Collaborator

@paulirish should this be closed now?

@patrickhulce
Copy link
Collaborator

patrickhulce commented May 5, 2017

This has actually become far more urgent now, Chrome now injects meta events into the trace that have a ts value of 0 which will cause issues like GoogleChrome/lighthouse#2114 far more frequently. At a minimum, it should probably be changed to the first non-zero timestamp of the trace (or first trace event not in the __metadata category).

The meta events are already screened for, in my case it was an issue with a page's user timing event that had been injected (like in GoogleChrome/lighthouse#2114).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants