summaryrefslogtreecommitdiff
path: root/cli/bench/http.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-08-19 09:56:12 +0530
committerGitHub <noreply@github.com>2023-08-19 09:56:12 +0530
commitc2259f78eb8180731bb562740695ab6e58c790e7 (patch)
treeb080b42ef86b3aa3802e7b3b7309d31cdf5f7ef8 /cli/bench/http.rs
parent0e4469c7a1d9afcffc53d714e6db4491e552d5c9 (diff)
chore: remove third_party submodule (#20201)
removes third_party submodule, tools are installed on-demand. - removed `load_test` and websocket benchmark (covered by benchy) - removed node/bun http benchmarks (covered by benchy) - `dlint` & `dprint` downloaded on-demand. - `wrk` & `hyperfine` downloaded before CI benchmark run. Install locally using: `./tools/install_prebuilt.js wrk hyperfine` #### updating dlint/dprint update version in `tools/util.js` and place binary in `denoland/deno_third_party`.
Diffstat (limited to 'cli/bench/http.rs')
-rw-r--r--cli/bench/http.rs79
1 files changed, 19 insertions, 60 deletions
diff --git a/cli/bench/http.rs b/cli/bench/http.rs
index 243ea3154..98fdef330 100644
--- a/cli/bench/http.rs
+++ b/cli/bench/http.rs
@@ -38,7 +38,6 @@ pub fn benchmark(
if path.ends_with(".lua") {
continue;
}
- let name = entry.file_name().into_string().unwrap();
let file_stem = pathbuf.file_stem().unwrap().to_str().unwrap();
let lua_script = http_dir.join(format!("{file_stem}.lua"));
@@ -48,65 +47,25 @@ pub fn benchmark(
}
let port = get_port();
- if name.starts_with("node") {
- // node <path> <port>
- res.insert(
- file_stem.to_string(),
- run(
- &["node", path, &port.to_string()],
- port,
- None,
- None,
- 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");
- #[cfg(target_os = "linux")]
- #[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_string(), path, &port.to_string()],
- port,
- None,
- None,
- maybe_lua,
- )?,
- );
- } else {
- // deno run -A --unstable <path> <addr>
- res.insert(
- file_stem.to_string(),
- run(
- &[
- deno_exe.as_str(),
- "run",
- "--allow-all",
- "--unstable",
- "--enable-testing-features-do-not-use",
- path,
- &server_addr(port),
- ],
- port,
- None,
- None,
- maybe_lua,
- )?,
- );
- }
+ // deno run -A --unstable <path> <addr>
+ res.insert(
+ file_stem.to_string(),
+ run(
+ &[
+ deno_exe.as_str(),
+ "run",
+ "--allow-all",
+ "--unstable",
+ "--enable-testing-features-do-not-use",
+ path,
+ &server_addr(port),
+ ],
+ port,
+ None,
+ None,
+ maybe_lua,
+ )?,
+ );
}
res.insert("hyper".to_string(), hyper_http(hyper_hello_exe)?);