Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit dd1a167

Browse files
committed
chore(metrics): use libevm metrics package and delete local metrics
- Enable metrics for specific tests
1 parent b6b4dfb commit dd1a167

File tree

97 files changed

+63
-5917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+63
-5917
lines changed

core/blockchain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ import (
4747
"github.com/ava-labs/coreth/core/types"
4848
"github.com/ava-labs/coreth/core/vm"
4949
"github.com/ava-labs/coreth/internal/version"
50-
"github.com/ava-labs/coreth/metrics"
5150
"github.com/ava-labs/coreth/params"
5251
"github.com/ava-labs/coreth/trie"
5352
"github.com/ava-labs/coreth/triedb"
5453
"github.com/ava-labs/coreth/triedb/hashdb"
5554
"github.com/ava-labs/coreth/triedb/pathdb"
55+
"github.com/ava-labs/libevm/metrics"
5656
"github.com/ethereum/go-ethereum/common"
5757
"github.com/ethereum/go-ethereum/common/lru"
5858
"github.com/ethereum/go-ethereum/ethdb"

core/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestMain(m *testing.M) {
1515
opts := []goleak.Option{
1616
// No good way to shut down these goroutines:
1717
goleak.IgnoreTopFunction("github.com/ava-labs/coreth/core/state/snapshot.(*diskLayer).generate"),
18-
goleak.IgnoreTopFunction("github.com/ava-labs/coreth/metrics.(*meterArbiter).tick"),
18+
goleak.IgnoreTopFunction("github.com/ava-labs/libevm/metrics.(*meterArbiter).tick"),
1919
goleak.IgnoreTopFunction("github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain"),
2020
}
2121
goleak.VerifyTestMain(m, opts...)

core/rawdb/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"encoding/binary"
3333

3434
"github.com/ava-labs/avalanchego/utils/wrappers"
35-
"github.com/ava-labs/coreth/metrics"
35+
"github.com/ava-labs/libevm/metrics"
3636
"github.com/ethereum/go-ethereum/common"
3737
"github.com/ethereum/go-ethereum/crypto"
3838
)

core/state/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
package state
2828

29-
import "github.com/ava-labs/coreth/metrics"
29+
import "github.com/ava-labs/libevm/metrics"
3030

3131
var (
3232
accountUpdatedMeter = metrics.NewRegisteredMeter("state/update/account", nil)

core/state/snapshot/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import (
3636

3737
"github.com/ava-labs/coreth/core/rawdb"
3838
"github.com/ava-labs/coreth/core/types"
39-
"github.com/ava-labs/coreth/metrics"
4039
"github.com/ava-labs/coreth/triedb"
40+
"github.com/ava-labs/libevm/metrics"
4141
"github.com/ethereum/go-ethereum/common"
4242
"github.com/ethereum/go-ethereum/ethdb"
4343
"github.com/ethereum/go-ethereum/log"

core/state/state_object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434
"time"
3535

3636
"github.com/ava-labs/coreth/core/types"
37-
"github.com/ava-labs/coreth/metrics"
3837
"github.com/ava-labs/coreth/trie/trienode"
38+
"github.com/ava-labs/libevm/metrics"
3939
"github.com/ethereum/go-ethereum/common"
4040
"github.com/ethereum/go-ethereum/crypto"
4141
"github.com/ethereum/go-ethereum/rlp"

core/state/statedb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ import (
3636
"github.com/ava-labs/coreth/core/rawdb"
3737
"github.com/ava-labs/coreth/core/state/snapshot"
3838
"github.com/ava-labs/coreth/core/types"
39-
"github.com/ava-labs/coreth/metrics"
4039
"github.com/ava-labs/coreth/params"
4140
"github.com/ava-labs/coreth/predicate"
4241
"github.com/ava-labs/coreth/trie"
4342
"github.com/ava-labs/coreth/trie/trienode"
4443
"github.com/ava-labs/coreth/trie/triestate"
4544
"github.com/ava-labs/coreth/utils"
45+
"github.com/ava-labs/libevm/metrics"
4646
"github.com/ethereum/go-ethereum/common"
4747
"github.com/ethereum/go-ethereum/crypto"
4848
"github.com/ethereum/go-ethereum/log"

core/state/trie_prefetcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"sync"
2121

2222
"github.com/ava-labs/coreth/libevm/options"
23-
"github.com/ava-labs/coreth/metrics"
23+
"github.com/ava-labs/libevm/metrics"
2424
"github.com/ethereum/go-ethereum/common"
2525
"github.com/ethereum/go-ethereum/log"
2626
)

core/state/trie_prefetcher_extra_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
"github.com/ava-labs/coreth/core/rawdb"
1717
"github.com/ava-labs/coreth/core/state/snapshot"
1818
"github.com/ava-labs/coreth/core/types"
19-
"github.com/ava-labs/coreth/metrics"
2019
"github.com/ava-labs/coreth/triedb"
2120
"github.com/ava-labs/coreth/triedb/hashdb"
21+
"github.com/ava-labs/libevm/metrics"
2222
"github.com/ethereum/go-ethereum/common"
2323
"github.com/ethereum/go-ethereum/ethdb"
2424
"github.com/stretchr/testify/require"

core/txpool/blobpool/blobpool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ import (
4545
"github.com/ava-labs/coreth/core/state"
4646
"github.com/ava-labs/coreth/core/txpool"
4747
"github.com/ava-labs/coreth/core/types"
48-
"github.com/ava-labs/coreth/metrics"
4948
"github.com/ava-labs/coreth/params"
49+
"github.com/ava-labs/libevm/metrics"
5050
"github.com/ethereum/go-ethereum/common"
5151
"github.com/ethereum/go-ethereum/event"
5252
"github.com/ethereum/go-ethereum/log"

0 commit comments

Comments
 (0)