aeternity
aeternity copied to clipboard
Sync stats improved
Fixes #4072.
Introduces a separate gen_server aec_sync_stats
holding sync statistics. It will log stats every 1000, 5000, 10000, 20000 and 100000 generations. Like:
2024-02-27 10:58:23.237 [info] <0.2078.0>@aec_sync_stats:log_agg_stats:{173,5} Synced 10000 generations: 4.74 ms/gen (12113 mblock(s), 77022 tx(s)) - Walltime: 121.68s CPU: 47.43s efficiency 38.98%
Where CPU is the time spent actually inserting blocks into the chain, not counting network, etc.
This PR also implements v3/sync-status
(only active while syncing, else 404):
$ curl http://localhost:3013/v3/sync-status
{"estimate":7080,"progress":0.35003,"speed":7686.92,"target":908483}
The estimate is remaining time in seconds, and the value will flucutate (probably a lot) - but it averages over the last 1000 generations and then makes a forward projection.
This PR is supperted by Æternity Foundation
thanks ❤️