From 435020f9b3da3fd964232642613bd0922cd0a21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 25 Mar 2019 16:27:46 +0200 Subject: [PATCH] core: split trie op metrics from the correct chain metrics --- core/blockchain.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 539f40d196..5d5c5e6805 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1271,13 +1271,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] storageUpdateTimer.Update(state.StorageUpdates) storageCommitTimer.Update(state.StorageCommits) - trieAccess := state.AccountReads + state.AccountHashes + state.AccountUpdates + state.AccountCommits - trieAccess += state.StorageReads + state.StorageHashes + state.StorageUpdates + state.StorageCommits - blockInsertTimer.UpdateSince(start) - blockExecutionTimer.Update(t1.Sub(t0) - trieAccess) - blockValidationTimer.Update(t2.Sub(t1)) - blockWriteTimer.Update(t3.Sub(t2)) + blockExecutionTimer.Update(t1.Sub(t0) - state.AccountReads - state.AccountUpdates - state.StorageReads - state.StorageUpdates) + blockValidationTimer.Update(t2.Sub(t1) - state.AccountHashes - state.StorageHashes) + blockWriteTimer.Update(t3.Sub(t2) - state.AccountCommits - state.StorageCommits) switch status { case CanonStatTy: