Back to Top

Calculate Javascript Execution Time

Updated 9 June 2015

During the java-script / jquery application development at webkul , every time we need to understand about the performance of the code life cycle as we work extensively on jquery and java-script / node.js it almost inevitable to check the code performance .

Console logging is brilliant feature for all the modern web browsers and almost every modern browser provide the console.log() api . You can use following java script methods to measure the  execution time

  • Date().getTime();
  • console.time()/console.timeEnd()
  • performance.now()

Date().getTime(); Example 

speed performance  Performance.now() Example  JS Binconsole.time()/console.timeEnd Example 

JS Bin

Start your headless eCommerce
now.
Find out More

console.time out put will be like this

 

Selection_010

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home