Reputation: 720
I hava a node.js scrpit and I want to measure it's running time. But when I run it like this:
time node xxx.js
It just give the time of running once. If I want to measure 10000 times's running time, how do i do it?
It just like %timeit
in ipython.
Upvotes: 0
Views: 25
Reputation: 241858
Just time a loop:
time for i in {1..10000} ; do node xxx.js ; done
Note that it measures node's startup time, too.
Upvotes: 1