laconicd-deprecated/x/evm/keeper/params_benchmark_test.go
mergify[bot] 00b0d4411f
tests(evm): add benchmark tests setup for params (#1623) (#1627)
* tests: add benchmark tests setup

* fix: localized benchmark tests to keeper

* update benchmark

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit 9305788d885ed16df9ece06daef4193ecd9df1f5)

Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
2023-01-23 18:40:27 +00:00

31 lines
545 B
Go

package keeper_test
import (
"testing"
"github.com/evmos/ethermint/x/evm/types"
)
func BenchmarkSetParams(b *testing.B) {
suite := KeeperTestSuite{}
suite.SetupTestWithT(b)
params := types.DefaultParams()
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = suite.app.EvmKeeper.SetParams(suite.ctx, params)
}
}
func BenchmarkGetParams(b *testing.B) {
suite := KeeperTestSuite{}
suite.SetupTestWithT(b)
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = suite.app.EvmKeeper.GetParams(suite.ctx)
}
}