Created
November 11, 2023 10:49
-
-
Save gmcabrita/06525ca62d3bd93c938c5c6ff82c8c94 to your computer and use it in GitHub Desktop.
await fetch node bun memory usage benchmark jarred sumner https://twitter.com/jarredsumner/status/1710517742984712341
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 i = 0; | |
async function main() { | |
while(true) { | |
console.log( | |
"Memory usage: ", | |
(process.memoryUsage.rss() / 1024 / 1024) | 0, | |
"MB", | |
"( time:", | |
performance.now(), | |
")", | |
"i:", | |
i++ | |
); | |
await (await fetch("http://example.com/", {})).text(); | |
} | |
} | |
main().then(() => {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment