Skip to content

Commit 9c3d7ed

Browse files
committed
core: add more
1 parent 338303c commit 9c3d7ed

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

core/blockchain_stats.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ DB commit: %v
119119
Block write: %v
120120
Total: %v
121121
122+
%s
122123
%s
123124
##############################
124125
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
@@ -127,11 +128,8 @@ Total: %v
127128
common.PrettyDuration(s.StorageReads), s.StorageLoaded,
128129
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
129130
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
130-
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats)
131-
132-
log.Info("")
131+
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats, s.StatePrefetchCacheStats)
133132
for _, line := range strings.Split(msg, "\n") {
134133
log.Info(line)
135134
}
136-
log.Info("")
137135
}

core/state/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func (s ReaderStats) String() string {
120120
if s.StorageDiskHit > 0 {
121121
storageDiskHitRate = float64(s.StorageDiskHit) / float64(s.StorageDiskHit+s.StorageDiskMiss) * 100
122122
}
123-
msg := fmt.Sprintf("=== Reader statistics ===\n")
123+
msg := fmt.Sprintf("Reader statistics\n")
124124
msg += fmt.Sprintf("account: cache (hit: %d, miss: %d, rate: %.2f)\n", s.AccountCacheHit, s.AccountCacheMiss, accountCacheHitRate)
125125
msg += fmt.Sprintf("account: disk (hit: %d, miss: %d, rate: %.2f)\n", s.AccountDiskHit, s.AccountDiskMiss, accountDiskHitRate)
126126
msg += fmt.Sprintf("storage: cache (hit: %d, miss: %d, rate: %.2f)\n", s.StorageCacheHit, s.StorageCacheMiss, storageCacheHitRate)

0 commit comments

Comments
 (0)