fix: Add some more stats to basic status page of TUI (disk usage, chain timestamp, tx pool size)#3046
Conversation
…in timestamp, tx pool size)
|
This is awesome! One small comment in the code, but otherwise LGTM. |
|
Thanks @DavidBurkett but I can't see your comment for some reason. |
| pub peer_count: u32, | ||
| /// Chain head | ||
| pub head: chain::Tip, | ||
| pub chain_stats: ChainStats, |
There was a problem hiding this comment.
Want to replace header_head with a ChainStats as well?
It would be useful to see the timestamp for the header chain during the initial header sync.
| total_difficulty: head.total_difficulty(), | ||
| }; | ||
|
|
||
| let disk_usage_gb = { |
There was a problem hiding this comment.
I see this is measuring disk usage for the main lmdb database.
We also use significant storage for the various MMR files as well (and the peers lmdb database, but less so).
chain_data/lmdb
chain_data/peer
chain_data/header/header_head
chain_data/header/sync_head
chain_data/txhashset/kernel
chain_data/txhashset/output
chain_data/txhashset/rangeproof
There was a problem hiding this comment.
These looked very small which is why I left them out. But I realise now I'm not running full archive and network activity is only low at the moment. I'll see about adding them to the usage statistic.
There was a problem hiding this comment.
The kernel and rangeproof MMRs should be approx 150MB each on mainnet, regardless of archive mode.
There was a problem hiding this comment.
Ok I was not looking hard enough.. I see them now. I added the Walkdir crate to go through the whole db_root dir, it's small has a nice API, do you think it's ok?
There was a problem hiding this comment.
Dependency on walkdir is fine I think. We already use it in the util crate. 👍
|
|
Hi. I added some more stats to the basic status page of the TUI to help node operators.
I've run this against mainnet and everything appears to be updating in real time as expected.