From 412e838171089c4f9d71249cdaf6b3cf91d9688e Mon Sep 17 00:00:00 2001 From: Chen Hui Date: Mon, 19 Sep 2022 14:14:31 +0800 Subject: [PATCH] benchmarks: fix invalid option of length for iperf benchmark According to iperf help page: ``` -l, --len #[kmKM] length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450). ``` So "--length 64K" option is invalid for iperf, actually it will be regard as default option "--len 128K". Signed-off-by: Chen Hui --- test/benchmarks/tools/iperf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/benchmarks/tools/iperf.go b/test/benchmarks/tools/iperf.go index ac4e7b550..cdd2d0cec 100644 --- a/test/benchmarks/tools/iperf.go +++ b/test/benchmarks/tools/iperf.go @@ -21,7 +21,7 @@ import ( "testing" ) -const length = 64 * 1024 +const length = 128 * 1024 // Iperf is for the client side of `iperf`. type Iperf struct { @@ -35,7 +35,7 @@ func (i *Iperf) MakeCmd(host string, port int) []string { "--format", "K", // Output in KBytes. "--realtime", // Measured in realtime. "--num", fmt.Sprintf("%dK", i.Num), // Number of bytes to send in KB. - "--length", fmt.Sprintf("%d", length), + "--len", fmt.Sprintf("%d", length), "--client", host, "--port", fmt.Sprintf("%d", port), }