Wednesday, 13 July 2016

Measuring execution time

To measure the time take to run a section of code:

> console.time("toggleSeries");

...

> console.timeEnd("toggleSeries");

Where the parameter is any label you want.

Gives the following output: