diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/benchmarks/ml/BUILD | 1 | ||||
-rw-r--r-- | test/benchmarks/ml/tensorflow_test.go | 11 | ||||
-rw-r--r-- | test/benchmarks/network/iperf_test.go | 9 |
3 files changed, 19 insertions, 2 deletions
diff --git a/test/benchmarks/ml/BUILD b/test/benchmarks/ml/BUILD index 285ec35d9..3425b8dad 100644 --- a/test/benchmarks/ml/BUILD +++ b/test/benchmarks/ml/BUILD @@ -18,5 +18,6 @@ benchmark_test( deps = [ "//pkg/test/dockerutil", "//test/benchmarks/harness", + "//test/benchmarks/tools", ], ) diff --git a/test/benchmarks/ml/tensorflow_test.go b/test/benchmarks/ml/tensorflow_test.go index b0e0c4720..8fa75d778 100644 --- a/test/benchmarks/ml/tensorflow_test.go +++ b/test/benchmarks/ml/tensorflow_test.go @@ -20,6 +20,7 @@ import ( "gvisor.dev/gvisor/pkg/test/dockerutil" "gvisor.dev/gvisor/test/benchmarks/harness" + "gvisor.dev/gvisor/test/benchmarks/tools" ) // BenchmarkTensorflow runs workloads from a TensorFlow tutorial. @@ -43,7 +44,15 @@ func BenchmarkTensorflow(b *testing.B) { defer machine.CleanUp() for name, workload := range workloads { - b.Run(name, func(b *testing.B) { + runName, err := tools.ParametersToName(tools.Parameter{ + Name: "operation", + Value: name, + }) + if err != nil { + b.Fatalf("Faile to parse param: %v", err) + } + + b.Run(runName, func(b *testing.B) { ctx := context.Background() b.ResetTimer() diff --git a/test/benchmarks/network/iperf_test.go b/test/benchmarks/network/iperf_test.go index d8dd2a6ae..296f9b1ac 100644 --- a/test/benchmarks/network/iperf_test.go +++ b/test/benchmarks/network/iperf_test.go @@ -56,7 +56,14 @@ func BenchmarkIperf(b *testing.B) { serverFunc: serverMachine.GetContainer, }, } { - b.Run(bm.name, func(b *testing.B) { + name, err := tools.ParametersToName(tools.Parameter{ + Name: "operation", + Value: bm.name, + }) + if err != nil { + b.Fatalf("Failed to parse parameters: %v", err) + } + b.Run(name, func(b *testing.B) { // Set up the containers. server := bm.serverFunc(ctx, b) defer server.CleanUp(ctx) |