Merge pull request #19331 from karalabe/fix-trie-metrics

core: split trie op metrics from the correct chain metrics
This commit is contained in:
Péter Szilágyi 2019-03-25 16:33:56 +02:00 committed by GitHub
commit f03402232c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1271,13 +1271,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []
storageUpdateTimer.Update(state.StorageUpdates) storageUpdateTimer.Update(state.StorageUpdates)
storageCommitTimer.Update(state.StorageCommits) 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) blockInsertTimer.UpdateSince(start)
blockExecutionTimer.Update(t1.Sub(t0) - trieAccess) blockExecutionTimer.Update(t1.Sub(t0) - state.AccountReads - state.AccountUpdates - state.StorageReads - state.StorageUpdates)
blockValidationTimer.Update(t2.Sub(t1)) blockValidationTimer.Update(t2.Sub(t1) - state.AccountHashes - state.StorageHashes)
blockWriteTimer.Update(t3.Sub(t2)) blockWriteTimer.Update(t3.Sub(t2) - state.AccountCommits - state.StorageCommits)
switch status { switch status {
case CanonStatTy: case CanonStatTy: