Skip to content

Commit

Permalink
add trie ops
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Nov 1, 2022
1 parent e7f44cf commit 41310b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ var (
blockContentValidationTimer = metrics.NewRegisteredTimer("chain/block/validations/content", nil)
blockStateInitTimer = metrics.NewRegisteredTimer("chain/block/inits/state", nil)
blockExecutionTimer = metrics.NewRegisteredTimer("chain/block/executions", nil)
blockTrieOpsTimer = metrics.NewRegisteredTimer("chain/block/trie", nil)
blockStateValidationTimer = metrics.NewRegisteredTimer("chain/block/validations/state", nil)
blockWriteTimer = metrics.NewRegisteredTimer("chain/block/writes", nil)

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

// Validate the state using the default validator
substart = time.Now()
Expand Down

0 comments on commit 41310b8

Please sign in to comment.