0

I'm a looking for a way to load a page (e.g. using selenium), measure page load timing and statistics on network calls. i.e. Similar information of what we could get from Chrome devtools network tab: request status, type, size, time, etc.

enter image description here

I have tried with lighthouse using the performance audit configuration. But I found un-consistency between the report generated by lighthouse and Chrome devtools network tab, see discussion on this thread.

Is there js library that could be used for this purpose?

bachr
  • 5,780
  • 12
  • 57
  • 92
  • 1
    Does [this](https://stackoverflow.com/questions/48763303/tools-for-measuring-ui-performance/48763513#48763513) or [this](https://stackoverflow.com/questions/48938449/chrome-api-for-performance-data/48941918#48941918) discussion helps you? – undetected Selenium Jun 15 '19 at 23:00
  • Oh thanks a lot, both links are helpful – bachr Jun 16 '19 at 02:22

1 Answers1

0

thanks to @DebanjanB for pointing out, I basically can get read performance data without need for an external lib.

var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var network = performance.getEntries() || {};
bachr
  • 5,780
  • 12
  • 57
  • 92