Measuring performance between high resolution timers

30th Sep 2013


Here's a quick tip for doing some simple performance measuring in Javascript. If you want to see how long a particular job takes you can use the new performance api like so:

Mark a starting point


End and measure

Once the job has completed you can tell the performance api to create a measurement between the current time and the mark you ceated earlier.

window.performance.measure('custom_measure', 'custom_name')

Grab the details

You can then get all the measurement information.


here is an example of the output

perf output