180
rated 0 times
[
187]
[
7]
/ answers: 1 / hits: 28348
/ 11 Years ago, mon, march 11, 2013, 12:00:00
I have a little snippet of node.js code in front of me that looks like this:
console.time(queryTime);
doAsyncIOBoundThing(function(err, results) {
console.timeEnd(queryTime);
// Process the results...
});
And of course when I run this on my (otherwise idle) development system, I get a nice console message like this:
queryTime: 564ms
However, if I put this into production, won't there likely be several async calls in progress simultaneously, and each of them will overwrite the previous timer? Or does node have some sort of magical execution context that gives each thread of execution a separate console timer namespace?
More From » node.js