How to Time JavaScript Execution on the Client-side.

Sam RuebyWeb Development Leave a Comment

I just found a quick and easy way to time how long a section of JavaScript took to execute.

In Chrome, use console.time(string) and console.timeEnd(string) . When timeEnd is called when the same string provided to time, the string and a duration in milliseconds is printed to the console.

Screenshot of Chrome DevTools using console.time()

Found here.