Created
April 16, 2019 01:11
-
-
Save deleteman/c5b32b3f0b071b5108b9bcb738623a1e 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
init(id, type, triggerID, resource) { | |
let meta = { | |
event: "[init]", | |
type, id, triggerID | |
} | |
fs.writeFileSync("./perf.log", JSON.stringify(meta) + "\n\t", {flag: "a"} ) | |
for(let p in resource) { | |
if(typeof(resource[p]) != "function") { | |
fs.writeFileSync("./perf.log", "[resource ] " + p + ":" + util.inspect(resource[p]) + "\n\t", {flag: "a"} ) | |
} | |
} | |
if (type == 'GETADDRINFOREQWRAP') { | |
performance.mark(resource.hostname + '-Init'); | |
map.set(id, resource.hostname) | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment