Fix parsing error w/ RubyDev benchmark.

PiperOrigin-RevId: 531299491
This commit is contained in:
Zach Koopmans
2023-05-11 13:59:48 -07:00
committed by gVisor bot
parent 570973f0be
commit 37bf1d04e3
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -40,5 +40,6 @@ benchmark_test(
"//pkg/test/dockerutil",
"//test/benchmarks/fs/fsbench",
"//test/benchmarks/harness",
"//test/benchmarks/tools",
],
)
+2 -1
View File
@@ -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.
+1 -1
View File
@@ -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.