go-ethereum/cmd/geth
rjl493456442 042c47ce1a
core: log detailed statistics for slow block (#32812)
This PR introduces a new debug feature, logging the slow blocks with
detailed performance statistics, such as state read, EVM execution and
so on.

Notably, the detailed performance statistics of slow blocks won't be
logged during the sync to not overwhelm users. Specifically, the statistics
are only logged if there is a single block processed.

Example output

```
########## SLOW BLOCK #########
Block: 23537063 (0xa7f878611c2dd27f245fc41107d12ebcf06b4e289f1d6acf44d49a169554ee09) txs: 248, mgasps: 202.99

EVM execution: 63.295ms
Validation: 1.130ms
Account read: 6.634ms(648)
Storage read: 17.391ms(1434)
State hash: 6.722ms
DB commit: 3.260ms
Block write: 1.954ms
Total: 99.094ms

State read cache: account (hit: 622, miss: 26), storage (hit: 1325, miss: 109)
##############################
```
2025-12-02 14:43:51 +01:00
..
testdata cmd/geth: update vcheck testdata, add docs on generating signatures (#32121) 2025-07-11 13:55:18 -06:00
accountcmd.go cmd/geth: remove unlock commandline flag (#30737) 2024-11-15 10:15:15 +01:00
accountcmd_test.go cmd/geth: remove unlock commandline flag (#30737) 2024-11-15 10:15:15 +01:00
attach_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
chaincmd.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
chaincmd_test.go cmd/geth: era-download logic fix (#32081) 2025-06-24 15:12:11 +08:00
config.go common: introduce IsHexHash and use it (#32998) 2025-11-04 21:09:36 +08:00
consolecmd.go internal/flags: remove Merge, it's identical to slices.Concat (#30706) 2024-10-31 19:26:02 +02:00
consolecmd_test.go cmd/utils: allow --networkid to override other config options (#32999) 2025-11-28 15:24:21 +01:00
dbcmd.go core, cmd: removed tablewriter from the dependencies (#33218) 2025-11-24 21:50:48 +08:00
exportcmd_test.go all: simplify tests using t.TempDir() (#30150) 2024-07-15 15:26:58 +02:00
genesis_test.go all: remove TerminalTotalDifficultyPassed (#30609) 2024-10-23 08:26:18 +02:00
logging_test.go .github: run tests with ci.go (#32590) 2025-09-11 20:15:51 +02:00
logtestcmd_active.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
logtestcmd_inactive.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
main.go core: log detailed statistics for slow block (#32812) 2025-12-02 14:43:51 +01:00
misccmd.go build, internal, version: break ci.go/version->common dependency (#30638) 2024-10-20 19:28:39 +03:00
run_test.go cmd, les, tests: remove light client code (#28586) 2023-11-23 16:28:26 +02:00
snapshot.go common: introduce IsHexHash and use it (#32998) 2025-11-04 21:09:36 +08:00
verkle.go cmd/geth: skip resolver for zero-commitment verkle children (#33265) 2025-11-25 20:34:58 +08:00
version_check.go cmd: migrate to urfave/cli/v2 (#24751) 2022-06-27 18:22:36 +02:00
version_check_test.go cmd/geth: update vcheck testdata, add docs on generating signatures (#32121) 2025-07-11 13:55:18 -06:00