title: How to get chrome performance metrics in javascript
body: <p>If I use Chrome Dev Tools I can do the following:</p>
  
  <ol>
  <li>Open chrome dev tools (right click on the page in chrome => inspect)</li>
  <li>Navigate to the "performance" tab</li>
  <li>Click the record button</li>
  <li>Click on a button in my web app</li>
  <li>Stop performance recording</li>
  </ol>
  
  <p>Then i get a nice little pie in the "Summary" tab of chrome:</p>
  
  <p><a href="https://i.stack.imgur.com/DDPj1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DDPj1.png" alt="enter image description here"></a></p>
  
  <p>My question is: </p>
  
  <p><strong>How can i start recording, stop recording and get those summary values (Loading, Scripting etc.) in javascript?</strong></p>
  
  <p>It would be really nice if someone could give me a little code example. </p>
  
  <p>My question is <em>not</em> 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.</p>