Go version

go version go1.22.3 linux/arm64

Output of go env in your module/workspace:

GOARCH='arm64'

What did you do?

Currently, x/benchmarks/sweet fails to run gvisor (which is enabled by default) on linux/arm64: ./sweet run ...

What did you see happen?

gvisor only runs on linux/amd64. (see more: https://github.com/golang/benchmarks/commit/34853f5dd1c4ed75883917af5af70be08c051e22).

What did you expect to see?

I think it's reasonable to only enable gvisor for amd64. E.g., a simple patch would be:

 sweet/cmd/sweet/benchmark.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sweet/cmd/sweet/benchmark.go b/sweet/cmd/sweet/benchmark.go
index 482d6a7..aaa3457 100644
--- a/sweet/cmd/sweet/benchmark.go
+++ b/sweet/cmd/sweet/benchmark.go
@@ -95,10 +95,13 @@ var benchmarkGroups = func() map[string][]*benchmark {
        allBenchmarksMap["etcd"],
        allBenchmarksMap["go-build"],
        allBenchmarksMap["gopher-lua"],
-       allBenchmarksMap["gvisor"],
        allBenchmarksMap["markdown"],
        allBenchmarksMap["tile38"],
    }
+   if runtime.GOARCH == "amd64" {
+       m["default"] = append(m["default"][:7], m["default"][6:]...)
+       m["default"][6] = allBenchmarksMap["gvisor"]
+   }

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

cc @mknyszek

Comment From: mknyszek

Seems fine to me, thanks for trying out the benchmarks on arm64. If you're able, please feel free to send a CL (or a PR) to me. See https://go.dev/doc/contribute. Otherwise I'll try to get to it in the near future, but a contribution would be helpful in moving this along faster, if you need it sooner. Thanks.

Comment From: haoliu-ampere

Thanks. I'd like to contribute. Let me follow that guide ...

Comment From: gabyhelp

Similar Issues

  • https://github.com/golang/go/issues/51445

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: mauri870

@haoliu-ampere Are you planning on sending a CL?

Comment From: haoliu-ampere

@haoliu-ampere Are you planning on sending a CL?

Yes. I'm still waiting for the CLA (maybe some legal concerns).

Comment From: gopherbot

Change https://go.dev/cl/601075 mentions this issue: sweet: only enable gvisor benchmark by default for amd64

Comment From: haoliu-ampere

Hi @mknyszek,

For https://go.dev/cl/601075, it should have been reviewed and voted. But it seems I cannot trigger the Trybots and Submit, could you please help to trigger the test suite and submit the change? Thanks in advance.

Trybots

After an initial reading of your change, maintainers will trigger trybots, a cluster of servers that will run the full test suite on several different architectures. Most trybots complete in a few minutes, at which point a link will be posted in Gerrit where you can see the results.

Submitting an approved change

When a change is ready, a maintainer will submit the change, which adds it as a commit to the Gerrit repository.

Comment From: mknyszek

Sorry for the delay, I've set CQ+1 and Auto-Submit.