Time-require
Were you looking for the stats of how long the require statements took in your scripts?
It's time to use (time-require)[https://www.npmjs.org/package/time-require] a node module that displays the execution time for Node.js modules loading by hooking and tracing all require() calls.
Example Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
This module makes use of a require (hook)[https://github.com/jaguard/time-require/blob/master/src/requireHook.js#L71] which is loaded as the first module so all the other requires gets counted, unhooks and then prints out a neat table with the totalTime = Date.now() - startTime.getTime();
and the number of modules that were required.
Thanks to the module author Ciprian Popa
GIF FTW!