Skip to content

Commit

Permalink
Fix bench test
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu committed Jun 27, 2023
1 parent 47b1326 commit 37b872e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions x/wasm/keeper/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,11 @@ func BenchmarkPruningWasmCodes(b *testing.B) {
ctx, keepers := CreateTestInput(b, false, AvailableCapabilities, WithWasmEngine(&mockWasmVM))

for i := 0; i < 100000; i++ {
contract := StoreRandomContract(b, ctx, keepers, &mockWasmVM)
if i%10 == 0 {
keepers.ContractKeeper.PinCode(ctx, contract.CodeID)
}
_ = StoreRandomContract(b, ctx, keepers, &mockWasmVM)
}

b.ResetTimer()
for i := 0; i < b.N; i++ {
keepers.WasmKeeper.PruneWasmCodes(ctx, 100000)
_ = keepers.WasmKeeper.PruneWasmCodes(ctx, 100000)
}
}

0 comments on commit 37b872e

Please sign in to comment.