Display the elapsed execution time of grunt tasks


Keywords
grunt, tasks, measure, time, profile, stat, stats, perf, performance, deprecated
License
MIT
Install
npm install time-grunt@1.2.2

Documentation

time-grunt Build Status

Display the elapsed execution time of grunt tasks

Install

$ npm install --save-dev time-grunt

Usage

// Gruntfile.js
module.exports = grunt => {
	// require it at the top and pass in the grunt instance
	require('time-grunt')(grunt);

	grunt.initConfig();
}

Optional callback

If you want to collect the timing stats for your own use, pass in a callback:

require('time-grunt')(grunt, (stats, done) => {
	// do whatever you want with the stats
	uploadReport(stats);

	// be sure to let grunt know when to exit
	done();
});

Clean layout

The watch task and tasks that take less than 1% of the total time are hidden to reduce clutter.

Run grunt with grunt --verbose to see all tasks.

Run grunt with grunt --quiet to quiet all tasks including time-grunt.

License

MIT © Sindre Sorhus