Skip to content

Commit c9275a8

Browse files
hliu-amperegopherbot
authored andcommitted
sweet: only enable gvisor benchmark by default for amd64
Currently this benchmark suite only run on amd64. This CL removes it from the default benchmarks for other architectures, so that "sweet run" can pass by default. This CL also adds a prerequisite check for amd64, so that it can report errors in advance. Fixes golang/go#67869 Change-Id: I0454d5557bb0587c1c0314a42b02bf88105a2fe4 Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/601075 Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Austin Clements <austin@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent af1e9c0 commit c9275a8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

sweet/cmd/sweet/benchmark.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,14 @@ var benchmarkGroups = func() map[string][]*benchmark {
105105
allBenchmarksMap["etcd"],
106106
allBenchmarksMap["go-build"],
107107
allBenchmarksMap["gopher-lua"],
108-
allBenchmarksMap["gvisor"],
108+
}
109+
if runtime.GOARCH == "amd64" {
110+
m["default"] = append(m["default"], allBenchmarksMap["gvisor"])
111+
}
112+
m["default"] = append(m["default"],
109113
allBenchmarksMap["markdown"],
110114
allBenchmarksMap["tile38"],
111-
}
115+
)
112116

113117
for i := range allBenchmarks {
114118
m["all"] = append(m["all"], &allBenchmarks[i])

sweet/harnesses/gvisor.go

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ func (h GVisor) CheckPrerequisites() error {
2121
if runtime.GOOS != "linux" {
2222
return fmt.Errorf("requires Linux")
2323
}
24+
if runtime.GOARCH != "amd64" {
25+
return fmt.Errorf("requires amd64")
26+
}
2427
return nil
2528
}
2629

0 commit comments

Comments
 (0)