mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-07 07:28:40 +00:00
core, core/state: fold prefetcher elapsed into StateReadMs for BAL blocks
For BAL blocks AccountReads/StorageReads/CodeReads stay zero by design, so the slow-block JSON state_read_ms read 0 — misleading to cross-client consumers. Sum s.Prefetch (the prefetcher's elapsed time) into the field; it's already zero on the pre-BAL path so the formula is unchanged there. Also gofmt -w on reader.go and reader_eip_7928.go (trailing blank lines left over from earlier cleanup).
This commit is contained in:
parent
e4f27275cf
commit
659af06a4c
3 changed files with 1 additions and 3 deletions
|
|
@ -222,7 +222,7 @@ func buildSlowBlockLog(s *ExecuteStats, block *types.Block) slowBlockLog {
|
||||||
},
|
},
|
||||||
Timing: slowBlockTime{
|
Timing: slowBlockTime{
|
||||||
ExecutionMs: durationToMs(s.Execution),
|
ExecutionMs: durationToMs(s.Execution),
|
||||||
StateReadMs: durationToMs(s.AccountReads + s.StorageReads + s.CodeReads),
|
StateReadMs: durationToMs(s.AccountReads + s.StorageReads + s.CodeReads + s.Prefetch),
|
||||||
StateHashMs: durationToMs(s.AccountHashes + s.AccountUpdates + s.StorageUpdates),
|
StateHashMs: durationToMs(s.AccountHashes + s.AccountUpdates + s.StorageUpdates),
|
||||||
CommitMs: durationToMs(max(s.AccountCommits, s.StorageCommits) + s.DatabaseCommit + s.BlockWrite),
|
CommitMs: durationToMs(max(s.AccountCommits, s.StorageCommits) + s.DatabaseCommit + s.BlockWrite),
|
||||||
TotalMs: durationToMs(s.TotalTime),
|
TotalMs: durationToMs(s.TotalTime),
|
||||||
|
|
|
||||||
|
|
@ -607,4 +607,3 @@ func (r *reader) GetStats() ReaderStats {
|
||||||
StateStats: r.GetStateStats(),
|
StateStats: r.GetStateStats(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -395,4 +395,3 @@ func (r *prefetchStateReader) GetStateStats() StateReaderStats {
|
||||||
}
|
}
|
||||||
return StateReaderStats{}
|
return StateReaderStats{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue