Skip to content

Commit 41310b8

Browse files
add trie ops
1 parent e7f44cf commit 41310b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/blockchain.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ var (
7373
blockContentValidationTimer = metrics.NewRegisteredTimer("chain/block/validations/content", nil)
7474
blockStateInitTimer = metrics.NewRegisteredTimer("chain/block/inits/state", nil)
7575
blockExecutionTimer = metrics.NewRegisteredTimer("chain/block/executions", nil)
76+
blockTrieOpsTimer = metrics.NewRegisteredTimer("chain/block/trie", nil)
7677
blockStateValidationTimer = metrics.NewRegisteredTimer("chain/block/validations/state", nil)
7778
blockWriteTimer = metrics.NewRegisteredTimer("chain/block/writes", nil)
7879

@@ -1177,6 +1178,7 @@ func (bc *BlockChain) insertBlock(block *types.Block, writes bool) error {
11771178
trieproc := statedb.SnapshotAccountReads + statedb.AccountReads + statedb.AccountUpdates
11781179
trieproc += statedb.SnapshotStorageReads + statedb.StorageReads + statedb.StorageUpdates
11791180
blockExecutionTimer.Update(time.Since(substart) - trieproc - triehash)
1181+
blockTrieOpsTimer.Update(trieproc + triehash)
11801182

11811183
// Validate the state using the default validator
11821184
substart = time.Now()

0 commit comments

Comments
 (0)