diff options
author | 2023-05-31 19:17:01 -0700 | |
---|---|---|
committer | 2023-05-31 19:17:01 -0700 | |
commit | cb0f76aa73f6b85667b57015a77ac39d9c78aa0b (patch) | |
tree | 949bcc466b3afbbb69a070d35d2b814f0e66be40 /bench/stream-file-upload-client/stream-file-bun.js | |
parent | 79d7b2075e63f79ec6d1d2a904178969eb701f0b (diff) | |
parent | 110d0752f333e4c32c9226e4a94e93f18837f9c7 (diff) | |
download | bun-cb0f76aa73f6b85667b57015a77ac39d9c78aa0b.tar.gz bun-cb0f76aa73f6b85667b57015a77ac39d9c78aa0b.tar.zst bun-cb0f76aa73f6b85667b57015a77ac39d9c78aa0b.zip |
Merge branch 'main' into jarred/port
Diffstat (limited to 'bench/stream-file-upload-client/stream-file-bun.js')
-rw-r--r-- | bench/stream-file-upload-client/stream-file-bun.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bench/stream-file-upload-client/stream-file-bun.js b/bench/stream-file-upload-client/stream-file-bun.js new file mode 100644 index 000000000..e3499bd29 --- /dev/null +++ b/bench/stream-file-upload-client/stream-file-bun.js @@ -0,0 +1,9 @@ +import { file } from "bun"; +console.time("stream-file-bun"); +const response = await fetch(process.env.URL ?? "http://localhost:3000", { + method: "POST", + body: file(process.env.FILE ?? "hello.txt"), +}); +console.timeEnd("stream-file-bun"); + +console.log("Sent", await response.text(), "bytes"); |