title: Using cypress, measure page load time
body: <p>Im using cypress to test a website, I need a way to measure the amount of time that it takes to load or execute certain cypress commands. For example:</p>
  <pre><code>//var startTime = SomeStopwatchFunction();
  cy.visit(&quot;/a website&quot;);
  cy.get(&quot;Some item&quot;);
  //cy.log(SomeStopwatchFunction - startTime);
  </code></pre>
  <p>I've tried using the <code>cy.clock()</code> but that returns 0. So I might be doing something wrong there. I've used <code>performance.now()</code> which kinda works but always returns the same value regardless of the load time. I've used <code>Date.getTime()</code> but that also returns 0. Its got to have something to do with how cypress executes the code but nothing seems to work.</p>