mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
core: move slowBlockBAL field docs onto the struct
Field semantics belong on the type so they survive future call sites and show up in godoc; the per-line comments at the constructor in buildSlowBlockLog were redundant with the struct definition.
This commit is contained in:
parent
aa13b208b1
commit
563cf08147
1 changed files with 32 additions and 21 deletions
|
|
@ -191,16 +191,27 @@ type slowBlockCodeCacheEntry struct {
|
|||
// optional "bal" field of slowBlockLog. It carries timings that are
|
||||
// well-defined under parallel execution but don't fit the sequential schema.
|
||||
type slowBlockBAL struct {
|
||||
ExecWallMs float64 `json:"exec_wall_ms"`
|
||||
PostProcessMs float64 `json:"post_process_ms"`
|
||||
PrefetchMs float64 `json:"prefetch_ms"`
|
||||
StatePrefetchMs float64 `json:"state_prefetch_ms"`
|
||||
AccountUpdateMs float64 `json:"account_update_ms"`
|
||||
StateUpdateMs float64 `json:"state_update_ms"`
|
||||
StateHashMs float64 `json:"state_hash_ms"`
|
||||
AccountCommitMs float64 `json:"account_commit_ms"`
|
||||
StorageCommitMs float64 `json:"storage_commit_ms"`
|
||||
TrieDBCommitMs float64 `json:"triedb_commit_ms"`
|
||||
// ExecWallMs is wall-clock parallel transaction execution.
|
||||
ExecWallMs float64 `json:"exec_wall_ms"`
|
||||
// PostProcessMs is post-tx system contracts (withdrawals, consolidations, finalize).
|
||||
PostProcessMs float64 `json:"post_process_ms"`
|
||||
// PrefetchMs is the BAL state prefetcher (alias of state_prefetch_ms).
|
||||
PrefetchMs float64 `json:"prefetch_ms"`
|
||||
// StatePrefetchMs is async state-load time during state-root computation.
|
||||
StatePrefetchMs float64 `json:"state_prefetch_ms"`
|
||||
// AccountUpdateMs is the account trie update phase.
|
||||
AccountUpdateMs float64 `json:"account_update_ms"`
|
||||
// StateUpdateMs is the state trie update phase.
|
||||
StateUpdateMs float64 `json:"state_update_ms"`
|
||||
// StateHashMs is state-root hash computation.
|
||||
StateHashMs float64 `json:"state_hash_ms"`
|
||||
// AccountCommitMs is the account trie commit to disk.
|
||||
AccountCommitMs float64 `json:"account_commit_ms"`
|
||||
// StorageCommitMs is the storage trie commit to disk.
|
||||
StorageCommitMs float64 `json:"storage_commit_ms"`
|
||||
// TrieDBCommitMs is the trie database commit.
|
||||
TrieDBCommitMs float64 `json:"triedb_commit_ms"`
|
||||
// SnapshotCommitMs is the state snapshot commit.
|
||||
SnapshotCommitMs float64 `json:"snapshot_commit_ms"`
|
||||
}
|
||||
|
||||
|
|
@ -270,17 +281,17 @@ func buildSlowBlockLog(s *ExecuteStats, block *types.Block) slowBlockLog {
|
|||
// Populate the parallel-execution extension only for BAL-processed blocks.
|
||||
if m := s.balTransitionStats; m != nil {
|
||||
logEntry.BAL = &slowBlockBAL{
|
||||
ExecWallMs: durationToMs(s.ExecWall), // wall-clock parallel transaction execution
|
||||
PostProcessMs: durationToMs(s.PostProcess), // post-tx system contracts (withdrawals, consolidations, finalize)
|
||||
PrefetchMs: durationToMs(s.Prefetch), // BAL state prefetcher (alias of state_prefetch_ms)
|
||||
StatePrefetchMs: durationToMs(m.StatePrefetch), // async state-load time during state-root computation
|
||||
AccountUpdateMs: durationToMs(m.AccountUpdate), // account trie update phase
|
||||
StateUpdateMs: durationToMs(m.StateUpdate), // state trie update phase
|
||||
StateHashMs: durationToMs(m.StateHash), // state-root hash computation
|
||||
AccountCommitMs: durationToMs(m.AccountCommits), // account trie commit to disk
|
||||
StorageCommitMs: durationToMs(m.StorageCommits), // storage trie commit to disk
|
||||
TrieDBCommitMs: durationToMs(m.TrieDBCommits), // trie database commit
|
||||
SnapshotCommitMs: durationToMs(m.SnapshotCommits), // state snapshot commit
|
||||
ExecWallMs: durationToMs(s.ExecWall),
|
||||
PostProcessMs: durationToMs(s.PostProcess),
|
||||
PrefetchMs: durationToMs(s.Prefetch),
|
||||
StatePrefetchMs: durationToMs(m.StatePrefetch),
|
||||
AccountUpdateMs: durationToMs(m.AccountUpdate),
|
||||
StateUpdateMs: durationToMs(m.StateUpdate),
|
||||
StateHashMs: durationToMs(m.StateHash),
|
||||
AccountCommitMs: durationToMs(m.AccountCommits),
|
||||
StorageCommitMs: durationToMs(m.StorageCommits),
|
||||
TrieDBCommitMs: durationToMs(m.TrieDBCommits),
|
||||
SnapshotCommitMs: durationToMs(m.SnapshotCommits),
|
||||
}
|
||||
}
|
||||
return logEntry
|
||||
|
|
|
|||
Loading…
Reference in a new issue