summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/tools
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-02-18 12:59:22 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-18 13:01:44 -0800
commitec20f4f38ef49efc8756595e6ec3fb3e578cc097 (patch)
treece2faa00bc16ade3a8f575c149a75c88d4de4407 /test/benchmarks/tools
parent2a2cb29e1cc5c94299b79a3e561d7a6915158ae6 (diff)
Make b.N increase by KB not bytes on iperf.
Currently, iperf runs a client that scales by bytes sent. In practice, this causes b.N to scale slowly and have several short lived containers. Instead, scale by KB to more quickly reach required time. PiperOrigin-RevId: 358244926
Diffstat (limited to 'test/benchmarks/tools')
-rw-r--r--test/benchmarks/tools/iperf.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/benchmarks/tools/iperf.go b/test/benchmarks/tools/iperf.go
index abf296731..8f410a9e8 100644
--- a/test/benchmarks/tools/iperf.go
+++ b/test/benchmarks/tools/iperf.go
@@ -26,7 +26,7 @@ const length = 64 * 1024
// Iperf is for the client side of `iperf`.
type Iperf struct {
- Num int
+ Num int // Number of bytes to send in KB.
}
// MakeCmd returns a iperf client command.
@@ -34,8 +34,8 @@ func (i *Iperf) MakeCmd(ip net.IP, port int) []string {
return []string{
"iperf",
"--format", "K", // Output in KBytes.
- "--realtime", // Measured in realtime.
- "--num", fmt.Sprintf("%d", i.Num),
+ "--realtime", // Measured in realtime.
+ "--num", fmt.Sprintf("%dK", i.Num), // Number of bytes to send in KB.
"--length", fmt.Sprintf("%d", length),
"--client", ip.String(),
"--port", fmt.Sprintf("%d", port),