Skip to content

Commit

Permalink
fix benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianElvis committed Feb 21, 2024
1 parent d335bbc commit e1a40d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/btcstaking/keeper/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/babylonchain/babylon/testutil/datagen"
btclctypes "github.com/babylonchain/babylon/x/btclightclient/types"
bsmodule "github.com/babylonchain/babylon/x/btcstaking"
"github.com/babylonchain/babylon/x/btcstaking/types"
"github.com/golang/mock/gomock"
Expand Down Expand Up @@ -67,6 +68,9 @@ func benchBeginBlock(b *testing.B, numFPs int, numDelsUnderFP int) {
}
}

// mock stuff
h.BTCLightClientKeeper.EXPECT().GetTipInfo(gomock.Eq(h.Ctx)).Return(&btclctypes.BTCHeaderInfo{Height: 30}).AnyTimes()

// Start the CPU profiler
cpuProfileFile := fmt.Sprintf("/tmp/btcstaking-beginblock-%d-%d-cpu.pprof", numFPs, numDelsUnderFP)
f, err := os.Create(cpuProfileFile)
Expand Down

0 comments on commit e1a40d2

Please sign in to comment.