mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
core: add more
This commit is contained in:
parent
90badc88a0
commit
0882c4b7ee
2 changed files with 3 additions and 5 deletions
|
|
@ -119,6 +119,7 @@ DB commit: %v
|
||||||
Block write: %v
|
Block write: %v
|
||||||
Total: %v
|
Total: %v
|
||||||
|
|
||||||
|
%s
|
||||||
%s
|
%s
|
||||||
##############################
|
##############################
|
||||||
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
|
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
|
||||||
|
|
@ -127,11 +128,8 @@ Total: %v
|
||||||
common.PrettyDuration(s.StorageReads), s.StorageLoaded,
|
common.PrettyDuration(s.StorageReads), s.StorageLoaded,
|
||||||
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
|
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
|
||||||
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
|
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
|
||||||
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats)
|
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats, s.StatePrefetchCacheStats)
|
||||||
|
|
||||||
log.Info("")
|
|
||||||
for _, line := range strings.Split(msg, "\n") {
|
for _, line := range strings.Split(msg, "\n") {
|
||||||
log.Info(line)
|
log.Info(line)
|
||||||
}
|
}
|
||||||
log.Info("")
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ func (s ReaderStats) String() string {
|
||||||
if s.StorageDiskHit > 0 {
|
if s.StorageDiskHit > 0 {
|
||||||
storageDiskHitRate = float64(s.StorageDiskHit) / float64(s.StorageDiskHit+s.StorageDiskMiss) * 100
|
storageDiskHitRate = float64(s.StorageDiskHit) / float64(s.StorageDiskHit+s.StorageDiskMiss) * 100
|
||||||
}
|
}
|
||||||
msg := fmt.Sprintf("=== Reader statistics ===\n")
|
msg := fmt.Sprintf("Reader statistics\n")
|
||||||
msg += fmt.Sprintf("account: cache (hit: %d, miss: %d, rate: %.2f)\n", s.AccountCacheHit, s.AccountCacheMiss, accountCacheHitRate)
|
msg += fmt.Sprintf("account: cache (hit: %d, miss: %d, rate: %.2f)\n", s.AccountCacheHit, s.AccountCacheMiss, accountCacheHitRate)
|
||||||
msg += fmt.Sprintf("account: disk (hit: %d, miss: %d, rate: %.2f)\n", s.AccountDiskHit, s.AccountDiskMiss, accountDiskHitRate)
|
msg += fmt.Sprintf("account: disk (hit: %d, miss: %d, rate: %.2f)\n", s.AccountDiskHit, s.AccountDiskMiss, accountDiskHitRate)
|
||||||
msg += fmt.Sprintf("storage: cache (hit: %d, miss: %d, rate: %.2f)\n", s.StorageCacheHit, s.StorageCacheMiss, storageCacheHitRate)
|
msg += fmt.Sprintf("storage: cache (hit: %d, miss: %d, rate: %.2f)\n", s.StorageCacheHit, s.StorageCacheMiss, storageCacheHitRate)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue