Marky, a high-resolution JavaScript timer

Marky, by Nolan Lawson:

JavaScript timer based on performance.mark() and performance.measure(), providing high-resolution timings as well as nice Dev Tools visualizations.

For browsers that don’t support performance.mark(), it falls back to performance.now() or Date.now(). In Node, it uses process.hrtime().

The greatest win to me is the visualization in the Dev Tools timeline.

After installing it with npm install marky use its mark() and stop() methods to time your stuff:

var marky = require('marky');

marky.mark('expensive operation');
doExpensiveOperation();
marky.stop('expensive operation');

Marky, a high-resolution JavaScript timer based on performance.mark() and performance.measure()

Elsewhere , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *