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 or 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');
marky.stop('expensive operation');

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

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.