From 41310b8816890759f76c31bc06ea47f67a38a185 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Tue, 1 Nov 2022 11:48:39 -0700 Subject: [PATCH] add trie ops --- core/blockchain.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index 3e1e97c63e..aa6e4ab84a 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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) @@ -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()