From 34853f5dd1c4ed75883917af5af70be08c051e22 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Sat, 18 May 2024 16:54:44 +0000 Subject: [PATCH] sweet: reenable gVisor benchmark The issue preventing the gVisor benchmark from working has magically been resolved by us doing nothing. Yay! Reenable the benchmark. ... Except the startup benchmark, which does `runsc run`, doesn't work on the builders. Womp womp. Disable just that benchmark for now; any coverage here is useful. Fixes #51445. Updates #67508. Change-Id: Ic0bd03038ef392640bf39c801cff2395678a8216 Cq-Include-Trybots: luci.golang.try:x_benchmarks-gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/586097 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt --- sweet/benchmarks/gvisor/main.go | 12 ++++++++---- sweet/cmd/sweet/benchmark.go | 9 +-------- sweet/cmd/sweet/integration_test.go | 3 +-- sweet/harnesses/gvisor.go | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/sweet/benchmarks/gvisor/main.go b/sweet/benchmarks/gvisor/main.go index b288e28..988c336 100644 --- a/sweet/benchmarks/gvisor/main.go +++ b/sweet/benchmarks/gvisor/main.go @@ -44,13 +44,17 @@ type benchmark interface { func main1() error { benchmarks := []benchmark{ - startup{}, + // TODO(go.dev/issue/67508): Disable the startup benchmark because it doesn't work + // on the builders. + // startup{}, systemCall{500000}, httpServer{20 * time.Second}, } if cliCfg.short { benchmarks = []benchmark{ - startup{}, + // TODO(go.dev/issue/67508): Disable the startup benchmark because it doesn't work + // on the builders. + // startup{}, systemCall{500}, httpServer{1 * time.Second}, } @@ -62,8 +66,8 @@ func main1() error { var buf bytes.Buffer if err := bench.run(&cliCfg, &buf); err != nil { if buf.Len() != 0 { - fmt.Fprintln(os.Stderr, "=== Benchmark stdout+stderr ===") - fmt.Fprintln(os.Stderr, buf.String()) + fmt.Fprintf(os.Stderr, "=== Benchmark %s stdout+stderr ===", bench.name()) + fmt.Fprintf(os.Stderr, "%s\n", buf.String()) } return err } diff --git a/sweet/cmd/sweet/benchmark.go b/sweet/cmd/sweet/benchmark.go index b3a1d6e..482d6a7 100644 --- a/sweet/cmd/sweet/benchmark.go +++ b/sweet/cmd/sweet/benchmark.go @@ -95,19 +95,12 @@ var benchmarkGroups = func() map[string][]*benchmark { allBenchmarksMap["etcd"], allBenchmarksMap["go-build"], allBenchmarksMap["gopher-lua"], - // TODO(go.dev/issue/51445): Enable once gVisor builds with Go 1.19. - // allBenchmarksMap["gvisor"], + allBenchmarksMap["gvisor"], allBenchmarksMap["markdown"], allBenchmarksMap["tile38"], } for i := range allBenchmarks { - switch allBenchmarks[i].name { - case "gvisor": - // TODO(go.dev/issue/51445): Include in "all" - // once gVisor builds with Go 1.19. - continue - } m["all"] = append(m["all"], &allBenchmarks[i]) } diff --git a/sweet/cmd/sweet/integration_test.go b/sweet/cmd/sweet/integration_test.go index e38d916..efba40d 100644 --- a/sweet/cmd/sweet/integration_test.go +++ b/sweet/cmd/sweet/integration_test.go @@ -200,8 +200,7 @@ func TestSweetEndToEnd(t *testing.T) { {"bleve-index", 1}, {"gopher-lua", 1}, {"markdown", 1}, - // TODO(go.dev/issue/51445): Enable once gVisor builds with Go 1.19. - // {"gvisor", 1}, + {"gvisor", 1}, } { sema.Acquire(context.Background(), shard.weight) wg.Add(1) diff --git a/sweet/harnesses/gvisor.go b/sweet/harnesses/gvisor.go index 31d20c8..46b9780 100644 --- a/sweet/harnesses/gvisor.go +++ b/sweet/harnesses/gvisor.go @@ -29,7 +29,7 @@ func (h GVisor) Get(gcfg *common.GetConfig) error { gcfg.SrcDir, "https://github.com/google/gvisor", "go", - "adc7bb5e1baf4a7489e428e1fad756e5e2aa3410", // release-20220228.0-4233-gadc7bb5e1 + "b75aeea", // release-20240513.0-37-g4f08fc481 ) }