diff --git a/test/benchmarks/fs/BUILD b/test/benchmarks/fs/BUILD index 79a7008a0..f606daf0e 100644 --- a/test/benchmarks/fs/BUILD +++ b/test/benchmarks/fs/BUILD @@ -40,5 +40,6 @@ benchmark_test( "//pkg/test/dockerutil", "//test/benchmarks/fs/fsbench", "//test/benchmarks/harness", + "//test/benchmarks/tools", ], ) diff --git a/test/benchmarks/fs/rubydev_test.go b/test/benchmarks/fs/rubydev_test.go index e0c376cf9..fe1ec9988 100644 --- a/test/benchmarks/fs/rubydev_test.go +++ b/test/benchmarks/fs/rubydev_test.go @@ -26,6 +26,7 @@ import ( "gvisor.dev/gvisor/test/benchmarks/fs/fsbench" "gvisor.dev/gvisor/test/benchmarks/harness" + "gvisor.dev/gvisor/test/benchmarks/tools" ) func runRubyBenchmark(b *testing.B, bm fsbench.FSBenchmark, cleanupDirPatterns []string) { @@ -76,7 +77,7 @@ func BenchmarkRubySpecTest(b *testing.B) { b.Errorf("failed to extract load time from fastlane test suite output: %v", err) return } - b.ReportMetric(loadTime, "load-sec") + tools.ReportCustomMetric(b, loadTime, "load", "sec") }, }, []string{ // Fastlane tests pollute the filesystem a lot. diff --git a/test/benchmarks/tools/parser_util.go b/test/benchmarks/tools/parser_util.go index a4555c7dd..dac7aa5a4 100644 --- a/test/benchmarks/tools/parser_util.go +++ b/test/benchmarks/tools/parser_util.go @@ -31,7 +31,7 @@ type Parameter struct { // Output is parsed and split by these values. Make them illegal in input methods. // We are constrained on what characters these can be by 1) docker's allowable // container names, 2) golang allowable benchmark names, and 3) golangs allowable -// charecters in b.ReportMetric calls. +// characters in b.ReportMetric calls. var illegalChars = regexp.MustCompile(`[/\.]`) // ParametersToName joins parameters into a string format for parsing.