Fix broken base64 bench (#456)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2022-04-13 12:02:26 +09:00
committed by GitHub
parent 8fc5d36efa
commit 4cd4d8a590

View File

@@ -22,7 +22,7 @@ func BenchmarkEngines(b *testing.B) {
defer m.Close()
runAllBenches(b, m)
})
if runtime.GOARCH == "amd64" {
if runtime.GOARCH == "amd64" || runtime.GOARCH == "arm64" {
b.Run("jit", func(b *testing.B) {
m := instantiateHostFunctionModuleWithEngine(b, wazero.NewRuntimeConfigJIT())
defer m.Close()
@@ -46,9 +46,11 @@ func runBase64Benches(b *testing.B, m api.Module) {
numPerExec := uint64(numPerExec)
b.ResetTimer()
b.Run(fmt.Sprintf("base64_%d_per_exec", numPerExec), func(b *testing.B) {
for i := 0; i < b.N; i++ {
if _, err := base64.Call(nil, numPerExec); err != nil {
b.Fatal(err)
}
}
})
}
}