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 <cedriccchen@tencent.com>
This commit is contained in:
Chen Hui
2022-09-23 12:32:18 +08:00
parent 5faa4646d9
commit 412e838171
+2 -2
View File
@@ -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),
}