Selaa lähdekoodia

core: split trie op metrics from the correct chain metrics

Péter Szilágyi 6 vuotta sitten
vanhempi
commit
435020f9b3
1 muutettua tiedostoa jossa 3 lisäystä ja 6 poistoa
  1. 3 6
      core/blockchain.go

+ 3 - 6
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: