diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-03-25 22:27:46 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-03-25 22:27:46 +0800 |
commit | 435020f9b3da3fd964232642613bd0922cd0a21d (patch) | |
tree | 42c7a211593460238336084c52428f54af057058 | |
parent | acbb8a1439a8c2c7bb879a10170423bfe03d8484 (diff) | |
download | go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar.gz go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar.bz2 go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar.lz go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar.xz go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.tar.zst go-tangerine-435020f9b3da3fd964232642613bd0922cd0a21d.zip |
core: split trie op metrics from the correct chain metrics
-rw-r--r-- | core/blockchain.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 539f40d19..5d5c5e680 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: |