dimanche 3 mars 2019

How to get chrome performance metrics in javascript

If I use Chrome Dev Tools I can do the following:

  1. Open chrome dev tools (right click on the page in chrome => inspect)
  2. Navigate to the "performance" tab
  3. Click the record button
  4. Click on a button in my web app
  5. Stop performance recording

Then i get a nice little pie in the "Summary" tab of chrome:

enter image description here

My question is:

How can i start recording, stop recording and get those summary values (Loading, Scripting etc.) in javascript?

It would be really nice if someone could give me a little code example.

My question is not on how I can handle page navigation, cause for this I am using C# selenium. What I want to do is start performance recording, execute some steps with the webdriver, stop recording and measure the performance.

Aucun commentaire:

Enregistrer un commentaire