Page MenuHomePhabricator

[Chronik] Add `-chronikperfstats` flag to write performance stats into <datadir>/perf
ClosedPublic

Authored by tobias_ruck on Aug 22 2023, 11:03.

Details

Summary

Collect performance stats for TxWriter, SpentByWriter, GroupUtxoWriter and GroupHistoryWriter, which are the biggest culprits regarding performance at the moment.

Add *Stats structs for each of them, but also *MemData structs, which allows later optimizations to store in-memory caches etc.

Bundle all of them in MemData, which can be mapped to StatsData to obtain just the stats.

After resync_indexer completed, write the collected data to perf/resync_stats.txt. In the future, we might add other kinds of files.

Test Plan

Resync indexer using -chronikperfstats, verify perf/resync_stats.txt is created.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Aug 22 2023, 12:39

Write full stats to resync_stats.txt, round seconds to 3 digits, add missing n_total for GroupUtxoWriter

This revision was landed with ongoing or failed builds.Aug 22 2023, 15:15
This revision was automatically updated to reflect the committed changes.