summaryrefslogtreecommitdiff
path: root/cli/bench/throughput.rs
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2021-03-26 03:17:37 +0900
committerGitHub <noreply@github.com>2021-03-25 19:17:37 +0100
commite7954413e16d5814db5da6389f8d6e0c328812aa (patch)
tree2840a275019df3e193c7c2f84442740ce7b7e48e /cli/bench/throughput.rs
parent881e1e8164f1661158bac24f7ec03b969a0a8a02 (diff)
upgrade: Rust 1.51.0 (#9895)
Diffstat (limited to 'cli/bench/throughput.rs')
-rw-r--r--cli/bench/throughput.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/bench/throughput.rs b/cli/bench/throughput.rs
index 83032e7a1..de18089bb 100644
--- a/cli/bench/throughput.rs
+++ b/cli/bench/throughput.rs
@@ -2,7 +2,7 @@
use super::Result;
use std::{
- path::PathBuf,
+ path::Path,
process::Command,
time::{Duration, Instant},
};
@@ -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) -> f64 {
+pub(crate) fn cat(deno_exe: &Path, megs: usize) -> f64 {
let size = megs * MB;
let shell_cmd = format!(
"{} run --allow-read cli/tests/cat.ts /dev/zero | head -c {}",
@@ -28,7 +28,7 @@ pub(crate) fn cat(deno_exe: &PathBuf, megs: usize) -> f64 {
(end - start).as_secs_f64()
}
-pub(crate) fn tcp(deno_exe: &PathBuf, megs: usize) -> Result<f64> {
+pub(crate) fn tcp(deno_exe: &Path, megs: usize) -> Result<f64> {
let size = megs * MB;
// The GNU flavor of `nc` requires the `-N` flag to shutdown the network socket after EOF on stdin