summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/network/iperf_test.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-07-15 18:19:52 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-15 18:21:51 -0700
commit5c8c0d65b9062dcbe195e7131a6a3c3fb8ba9583 (patch)
tree6b547e821ec9d073778a7dc2bb03b2de3622db21 /test/benchmarks/network/iperf_test.go
parente92f38ff0cd2e490637df2081fc8f75ddaf32937 (diff)
Port httpd benchmark
PiperOrigin-RevId: 321478001
Diffstat (limited to 'test/benchmarks/network/iperf_test.go')
-rw-r--r--test/benchmarks/network/iperf_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/benchmarks/network/iperf_test.go b/test/benchmarks/network/iperf_test.go
index 72e9c99a8..48cc9dd8f 100644
--- a/test/benchmarks/network/iperf_test.go
+++ b/test/benchmarks/network/iperf_test.go
@@ -35,11 +35,13 @@ func BenchmarkIperf(b *testing.B) {
if err != nil {
b.Fatalf("failed to get machine: %v", err)
}
+ defer clientMachine.CleanUp()
serverMachine, err := h.GetMachine()
if err != nil {
b.Fatalf("failed to get machine: %v", err)
}
+ defer serverMachine.CleanUp()
for _, bm := range []struct {
name string
@@ -111,7 +113,7 @@ func BenchmarkIperf(b *testing.B) {
if err != nil {
b.Fatalf("failed to parse bandwitdth from %s: %v", out, err)
}
- b.ReportMetric(bW, "KBytes/sec")
+ b.ReportMetric(bW*1024, "bandwidth") // Convert from Kb/s to b/s.
b.StartTimer()
}
})