Skip to content

Commit

Permalink
fix(tm2/iavl/benchmarks): skip benchmarks that run for too long (#2854)
Browse files Browse the repository at this point in the history
Fixing some benchmarks that were failing after activating benchmark runs
at PRs and master.

Signed-off-by: Antonio Navarro <[email protected]>
  • Loading branch information
ajnavarro authored Sep 26, 2024
1 parent 0bfa8ff commit f69880b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gnovm/pkg/gnolang/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import (
"sync"
"testing"

"github.com/gnolang/overflow"

"github.com/gnolang/gno/tm2/pkg/errors"
"github.com/gnolang/gno/tm2/pkg/std"
"github.com/gnolang/gno/tm2/pkg/store"
"github.com/gnolang/overflow"
)

// Exception represents a panic that originates from a gno program.
Expand Down Expand Up @@ -2216,6 +2217,10 @@ func (m *Machine) String() string {

for i := len(m.Blocks) - 1; i > 0; i-- {
b := m.Blocks[i]
if b == nil {
continue
}

gen := builder.Len()/3 + 1
gens := "@" // strings.Repeat("@", gen)

Expand Down
5 changes: 5 additions & 0 deletions tm2/pkg/iavl/benchmarks/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,14 @@ func BenchmarkMedium(b *testing.B) {
}

func BenchmarkLarge(b *testing.B) {
b.Skip("large is too large")

ls := db.BackendList()
bs := make([]benchmark, 0, len(ls))
for _, backend := range ls {
if backend == db.BoltDBBackend {
continue
}
bs = append(bs, benchmark{backend, 1_000_000, 100, 16, 40})
}
runBenchmarks(b, bs)
Expand Down

0 comments on commit f69880b

Please sign in to comment.