summaryrefslogtreecommitdiff
path: root/cli/bench/http.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /cli/bench/http.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/bench/http.rs')
-rw-r--r--cli/bench/http.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/bench/http.rs b/cli/bench/http.rs
index 585574e2d..06a177386 100644
--- a/cli/bench/http.rs
+++ b/cli/bench/http.rs
@@ -44,7 +44,7 @@ pub fn benchmark(
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!("{}.lua", file_stem));
+ let lua_script = http_dir.join(format!("{file_stem}.lua"));
let mut maybe_lua = None;
if lua_script.exists() {
maybe_lua = Some(lua_script.to_str().unwrap());
@@ -158,7 +158,7 @@ fn run(
let wrk = test_util::prebuilt_tool_path("wrk");
assert!(wrk.is_file());
- let addr = format!("http://127.0.0.1:{}/", port);
+ let addr = format!("http://127.0.0.1:{port}/");
let mut wrk_cmd =
vec![wrk.to_str().unwrap(), "-d", DURATION, "--latency", &addr];
@@ -172,7 +172,7 @@ fn run(
std::thread::sleep(Duration::from_secs(1)); // wait to capture failure. TODO racy.
- println!("{}", output);
+ println!("{output}");
assert!(
server.try_wait()?.map_or(true, |s| s.success()),
"server ended with error"
@@ -194,7 +194,7 @@ fn get_port() -> u16 {
}
fn server_addr(port: u16) -> String {
- format!("0.0.0.0:{}", port)
+ format!("0.0.0.0:{port}")
}
fn core_http_json_ops(exe: &str) -> Result<HttpBenchmarkResult> {