diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-01-06 03:29:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 14:29:50 -0500 |
commit | 896dd56b7af06fea6604a5596a6ffd17e7e52e6e (patch) | |
tree | 92d3c94afe4923f1d1faccc8034a03f78b807ade /cli/bench | |
parent | 4e6b78cb43ece70df28281c8033b51366b110acf (diff) |
refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)
Diffstat (limited to 'cli/bench')
-rw-r--r-- | cli/bench/http.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/bench/http.rs b/cli/bench/http.rs index c95ba9721..7c416f93c 100644 --- a/cli/bench/http.rs +++ b/cli/bench/http.rs @@ -1,8 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use super::Result; use std::sync::atomic::{AtomicU16, Ordering}; use std::{collections::HashMap, path::Path, process::Command, time::Duration}; + +use super::Result; + pub use test_util::{parse_wrk_output, WrkOutput as HttpBenchmarkResult}; // Some of the benchmarks in this file have been renamed. In case the history // somehow gets messed up: @@ -27,7 +29,7 @@ pub fn benchmark( let mut res = HashMap::new(); let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); let http_dir = manifest_dir.join("bench").join("http"); - for entry in std::fs::read_dir(http_dir.clone())? { + for entry in std::fs::read_dir(&http_dir)? { let entry = entry?; let pathbuf = entry.path(); let path = pathbuf.to_str().unwrap(); |