From 5c45e181c1f39a1e000e883f65c991cf5b73d26e Mon Sep 17 00:00:00 2001 From: oneofthezombies Date: Sun, 11 Feb 2024 15:40:48 +0900 Subject: [PATCH] wip: blocking --- test.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test.mjs b/test.mjs index 99ab307..a46038b 100644 --- a/test.mjs +++ b/test.mjs @@ -14,7 +14,7 @@ async function main() { target.on("spawn", () => { console.log(`Spawned server ${target.pid}`); const start = Date.now(); - const kill_tree = spawn("target/release/blocking", [target.pid], { + const kill_tree = spawn("target/release/tokio", [target.pid], { stdio: "inherit", }); kill_tree.on("exit", () => { @@ -51,3 +51,11 @@ main(); // tokio // Total elapsed time: 6285ms // Mean elapsed time: 6.285ms + +// macos +// blocking +// Total elapsed time: 4100ms +// Mean elapsed time: 4.1ms +// tokio +// Total elapsed time: 20227ms +// Mean elapsed time: 20.227ms