Webkul
Services
Technologies Bagisto QloApps
iOS Android SAP BigCommerce Wix
Trusted by
Samsung Intel Toyota Walmart Disney Nokia Nestlé Decathlon
See all customers
Back to Top
DOC

Calculate Javascript Execution Time

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

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