summaryrefslogtreecommitdiff
path: root/cli/bench
diff options
context:
space:
mode:
Diffstat (limited to 'cli/bench')
-rw-r--r--cli/bench/main.rs4
-rw-r--r--cli/bench/throughput.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs
index 352c93010..d2823a02b 100644
--- a/cli/bench/main.rs
+++ b/cli/bench/main.rs
@@ -297,9 +297,9 @@ fn run_throughput(deno_exe: &PathBuf) -> Result<HashMap<String, f64>> {
let mut m = HashMap::<String, f64>::new();
m.insert("100M_tcp".to_string(), throughput::tcp(deno_exe, 100)?);
- m.insert("100M_cat".to_string(), throughput::cat(deno_exe, 100)?);
+ m.insert("100M_cat".to_string(), throughput::cat(deno_exe, 100));
m.insert("10M_tcp".to_string(), throughput::tcp(deno_exe, 10)?);
- m.insert("10M_cat".to_string(), throughput::cat(deno_exe, 10)?);
+ m.insert("10M_cat".to_string(), throughput::cat(deno_exe, 10));
Ok(m)
}
diff --git a/cli/bench/throughput.rs b/cli/bench/throughput.rs
index 6fd3972d1..83032e7a1 100644
--- a/cli/bench/throughput.rs
+++ b/cli/bench/throughput.rs
@@ -11,7 +11,7 @@ const MB: usize = 1024 * 1024;
const SERVER_ADDR: &str = "0.0.0.0:4544";
const CLIENT_ADDR: &str = "127.0.0.1 4544";
-pub(crate) fn cat(deno_exe: &PathBuf, megs: usize) -> Result<f64> {
+pub(crate) fn cat(deno_exe: &PathBuf, megs: usize) -> f64 {
let size = megs * MB;
let shell_cmd = format!(
"{} run --allow-read cli/tests/cat.ts /dev/zero | head -c {}",
@@ -25,7 +25,7 @@ pub(crate) fn cat(deno_exe: &PathBuf, megs: usize) -> Result<f64> {
let _ = test_util::run_collect(cmd, None, None, None, true);
let end = Instant::now();
- Ok((end - start).as_secs_f64())
+ (end - start).as_secs_f64()
}
pub(crate) fn tcp(deno_exe: &PathBuf, megs: usize) -> Result<f64> {