The problem with this is that the for loop completes quickly, meanwhile the Execution of the Item.save() method is not yet complete.
Any suggestions how to time this that takes into account the full execution time within the contents of the loop?
var start = new Date().getTime(); var Item = new Item(); for (i = 0; i
EDIT: This is on a nodejs server.
Just use Chrome's profiling tools. They give you total insight into exactly how much CPU time every function call on your page is taking up:
For Node, you can try node-inspector's experimental profiler.