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

Performance metrics: expose more useful performance.timing metrics #1145

Closed
ebidel opened this issue Dec 12, 2016 · 2 comments
Closed

Performance metrics: expose more useful performance.timing metrics #1145

ebidel opened this issue Dec 12, 2016 · 2 comments

Comments

@ebidel
Copy link
Contributor

ebidel commented Dec 12, 2016

I'm reading http://calendar.perfplanet.com/2016/prefer-defer-over-async/, and now want to test this on my site. But we don't expose enough interesting metrics in the report.

Some things worth adding:

const t = performance.timing;

const pageloadAt = t.loadEventStart - t.navigationStart;

const dnsLookupTime = t.domainLookupEnd - t.domainLookupStart;
const tcpTime = t.connectEnd - t.connectStart;
const ttfb = t.responseStart - t.navigationStart;

const DOMConstructionTook = t.domContentLoadedEventStart - t.domLoading;
const DOMInteractiveAt = t.domInteractive - t.navigationStart;
const DOMContentLoadedAt = t.domContentLoadedEventEnd - t.navigationStart;

Feel free to modify the suggested calculations.

We could also create audits based off some of these. For example, if we got the dns time for different resources on the page, we could recommend #873 based on some threshold.

@brendankenny
Copy link
Member

For DNS stuff here, one thing I learned from taking a stab at #873 is that you unfortunately can't really use the DNS timing as (IIUC) Chrome defers to the OS-level DNS cache for lookups. Even if you load the site again in a completely blank Chrome profile, the DNS lookup will be much faster than when done with no previous visits on that machine.

@paulirish
Copy link
Member

Working with Chrome Speed Metrics on the most useful metrics to provide.

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

No branches or pull requests

3 participants