This repository was archived by the owner on Apr 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 5
5
"encoding/json"
6
6
"math"
7
7
"math/big"
8
+ "os"
8
9
"testing"
9
10
"time"
10
11
@@ -77,6 +78,9 @@ type KeeperTestSuite struct {
77
78
var s * KeeperTestSuite
78
79
79
80
func TestKeeperTestSuite (t * testing.T ) {
81
+ if os .Getenv ("benchmark" ) != "" {
82
+ t .Skip ("Skipping Gingko Test" )
83
+ }
80
84
s = new (KeeperTestSuite )
81
85
s .enableFeemarket = false
82
86
s .enableLondonHF = true
Original file line number Diff line number Diff line change
1
+ package keeper_test
2
+
3
+ import (
4
+ "testing"
5
+
6
+ "github.com/evmos/ethermint/x/evm/types"
7
+ )
8
+
9
+ func BenchmarkSetParams (b * testing.B ) {
10
+ suite := KeeperTestSuite {}
11
+ suite .SetupTestWithT (b )
12
+ params := types .DefaultParams ()
13
+
14
+ b .ReportAllocs ()
15
+ b .ResetTimer ()
16
+ for i := 0 ; i < b .N ; i ++ {
17
+ _ = suite .app .EvmKeeper .SetParams (suite .ctx , params )
18
+ }
19
+ }
20
+
21
+ func BenchmarkGetParams (b * testing.B ) {
22
+ suite := KeeperTestSuite {}
23
+ suite .SetupTestWithT (b )
24
+
25
+ b .ReportAllocs ()
26
+ b .ResetTimer ()
27
+ for i := 0 ; i < b .N ; i ++ {
28
+ _ = suite .app .EvmKeeper .GetParams (suite .ctx )
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments