Computes the time it takes to generate the dependency trees for all application entry points within a directory
npm install time-to-generate-tree
var timeToTrees = require('time-to-generate-tree');
timeToTrees({
// If you want to profile all entry points to your application (optional)
directory: 'path/to/my/js/files',
// If you want to profile a single file (optional)
filename: 'path/to/a/file',
success: function(err, timeData) {
}
});-
You must supply either the
directoryor afilename -
The returned
timeDatais an object where the keys are the filenames and the values are the time it took to generate the dependency trees. -
You may pass additional options supported by
get-driver-scriptsto handle pulling driver scripts from a RequireJS build config or resolving aliased paths via a requirejs config.
Prints the time data in tabular form
Requires a global install npm install -g time-to-generate-tree
time-to-generate-tree <directory>