Marky, by Nolan Lawson:
JavaScript timer based on
performance.mark()
andperformance.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()
orDate.now()
. In Node, it usesprocess.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()
→