Last active
August 29, 2015 14:11
-
-
Save dsummersl/8920d982c5c5418c4f74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
var dns = require("dns"); | |
var count = 0; | |
var gotResponse = true; | |
setInterval(function () { | |
var cnt = ++count; | |
if (gotResponse) { | |
gotResponse = false; | |
console.time("dnslookup"+ cnt); | |
dns.lookup("carbon.hostedgraphite.com",4,function(err, address, family) { | |
console.timeEnd("dnslookup"+ cnt); | |
gotResponse = true; | |
}); | |
} | |
},1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dns = require("dns"); | |
var count = 0; | |
setInterval(function () { | |
var cnt = ++count; | |
console.time("dnslookup"+ cnt); | |
dns.lookup("carbon.hostedgraphite.com",4,function(err, address, family) { | |
console.timeEnd("dnslookup"+ cnt); | |
}); | |
},1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment