summaryrefslogtreecommitdiff
path: root/cli/bench/http.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-06-29 16:57:19 +0530
committerGitHub <noreply@github.com>2022-06-29 16:57:19 +0530
commit5eb9abd65f97e43b50aeb724deb8e3b7847681e9 (patch)
treea59b562fbba383ca17ec02c768db9d77c282d870 /cli/bench/http.rs
parent91570ba6e85ae927f0979c0d2dde5684cb6823ff (diff)
chore(cli/bench): Add bun HTTP server (#15004)
Diffstat (limited to 'cli/bench/http.rs')
-rw-r--r--cli/bench/http.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/bench/http.rs b/cli/bench/http.rs
index 3735fde1b..c577e577a 100644
--- a/cli/bench/http.rs
+++ b/cli/bench/http.rs
@@ -53,6 +53,29 @@ pub fn benchmark(
maybe_lua,
)?,
);
+ } else if name.starts_with("bun") && !cfg!(target_os = "windows") {
+ // Bun does not support Windows.
+ #[cfg(target_arch = "x86_64")]
+ #[cfg(not(target_vendor = "apple"))]
+ let bun_exe = test_util::prebuilt_tool_path("bun");
+ #[cfg(target_vendor = "apple")]
+ #[cfg(target_arch = "x86_64")]
+ let bun_exe = test_util::prebuilt_tool_path("bun-x64");
+ #[cfg(target_vendor = "apple")]
+ #[cfg(target_arch = "aarch64")]
+ let bun_exe = test_util::prebuilt_tool_path("bun-aarch64");
+
+ // bun <path> <port>
+ res.insert(
+ file_stem.to_string(),
+ run(
+ &[bun_exe.to_str().unwrap(), path, &port.to_string()],
+ port,
+ None,
+ None,
+ maybe_lua,
+ )?,
+ );
} else {
// deno run -A --unstable <path> <addr>
res.insert(