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

DNS and Connect timings #477

Closed
gnublin opened this issue Jan 26, 2015 · 4 comments
Closed

DNS and Connect timings #477

gnublin opened this issue Jan 26, 2015 · 4 comments
Labels
Chrome-headless Tasks related with migration from PhantomJS to Puppeteer's headless Chrome new metric

Comments

@gnublin
Copy link

gnublin commented Jan 26, 2015

Hello,

Do you have an option to get DNS and Connect time ? (like performance.timing value)

Regards,
Gnublin.

@macbre
Copy link
Owner

macbre commented Jan 26, 2015

@gnublin, phantomas does not provide this information at the moment. We're blocked on ariya/phantomjs#10245

@macbre macbre added this to the Roadmap milestone Jan 26, 2015
@macbre macbre changed the title DNS and Connect DNS and Connect timings Jan 26, 2015
@macbre
Copy link
Owner

macbre commented Jul 3, 2015

SlimerJS and PhantomJS 2.0 support Resource Timing API which exposes information such as connection and DNS lookup times.

@macbre
Copy link
Owner

macbre commented Oct 18, 2015

Introduce performanceTiming module with the following metrics:

  • performanceTimingConnect
  • performanceTimingDNS
  • performanceTimingPageLoad
  • performanceTimingTTFB
// Navigation Timing
var t = performance.timing,
    pageloadtime = t.loadEventStart - t.navigationStart,
    dns = t.domainLookupEnd - t.domainLookupStart,
    tcp = t.connectEnd - t.connectStart,
    ttfb = t.responseStart - t.navigationStart;

http://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/

macbre added a commit that referenced this issue Oct 18, 2015
@macbre
Copy link
Owner

macbre commented Oct 18, 2015

Implemented (see #567), however I get strange results in both SlimerJS and PhantomJS 2.0. Times for DNS and HTTP connection are always zero and page load time is pretty small compared to the values of the other metrics.

$ ./bin/phantomas.js http://www.example.com --modules windowPerformance --verbose --gecko

10:16:16.149 performanceTiming: data {"navigationStart":1445163374274,"unloadEventStart":0,"unloadEventEnd":0,"redirectStart":0,"redirectEnd":0,"fetchStart":1445163374274,"domainLookupStart":1445163374274,"domainLookupEnd":1445163374274,"connectStart":1445163374274,"connectEnd":1445163374274,"requestStart":1445163374274,"responseStart":1445163374274,"responseEnd":1445163374274,"domLoading":1445163374304,"domInteractive":1445163374308,"domContentLoadedEventStart":1445163374312,"domContentLoadedEventEnd":1445163374312,"domComplete":1445163374313,"loadEventStart":1445163374313,"loadEventEnd":1445163374313}

* timeToFirstByte: 280 ms
* timeToLastByte: 283 ms
* domInteractive: 38 ms
* domContentLoaded: 35 ms
* domContentLoadedEnd: 54 ms
* domComplete: 59 ms
* timeBackend: 83 %
* timeFrontend: 17 %
* performanceTimingConnect: 0 ms
* performanceTimingDNS: 0 ms
* performanceTimingPageLoad: 39 ms
* performanceTimingTTFB: 0 ms

@macbre macbre reopened this Nov 2, 2015
@macbre macbre modified the milestones: v1.13, Roadmap Mar 25, 2016
@macbre macbre modified the milestones: Roadmap, v1.21 - headless Chromium Jan 24, 2018
@macbre macbre added the Chrome-headless Tasks related with migration from PhantomJS to Puppeteer's headless Chrome label Feb 23, 2019
macbre added a commit that referenced this issue Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chrome-headless Tasks related with migration from PhantomJS to Puppeteer's headless Chrome new metric
Projects
None yet
Development

No branches or pull requests

2 participants