var http = require("http");
var req_total = 10, req_per_sec = 30, i = 0;
var intervalID = setInterval(function timerik() { i++; console.log(i); //write to console task number console.time(i + ' latency');
if(i == req_total){ clearInterval(intervalID); //end of Life }
console.log(i +" result = " + response.statusCode); //write to console task number and statusCode console.timeEnd(i +' latency'); //write to console operation timeout });
}, 1000/req_per_sec);"C:\Program Files\nodejs\node.exe" run4.js1233 result = 2003 latency: 24ms44 result = 2004 latency: 11ms4 result = 2004 latency: 43ms566 result = 2006 latency: 12ms77 result = 2007 latency: 8ms8910
Process finished with exit code 0--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/fbbb0d28-b52a-4261-b1de-49ea3774f7ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"C:\Program Files\nodejs\node.exe" run4.js1231 result = 2001 latency: 111ms42 result = 2002 latency: 95ms53 result = 2003 latency: 99ms64 result = 2004 latency: 109ms75 result = 2005 latency: 105ms8910
Process finished with exit code 0