Log timings with javascript console
If you're curious about the time delta between two lines of code in javascript, you can use the console.time
and console.timeEnd
functions to get that delta.
> console.time("a")
undefined
> console.timeEnd("a")
a: 8136ms
undefined
The string passed in is just a token for the section you want to time.
h/t Chase McCarthy
Tweet