Skip to content

Instantly share code, notes, and snippets.

@gmcabrita
Created November 11, 2023 10:49
Show Gist options
  • Save gmcabrita/06525ca62d3bd93c938c5c6ff82c8c94 to your computer and use it in GitHub Desktop.
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
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