plugins
plugins copied to clipboard
feat: getstats plugin draft
DRAFT
This adds a persistent timeseries tracking plugin for runtime variables, events and counters. This includes:
- variables: num_peers, num_channels, utxos, ...
- events: (dis)connects, htlcs, any hooks, ...
- counters (events with values): fees, amounts, len(custom_message), ...
It also offers query and management functions as CLI methods that can be used by other plugins to make better decisions about fees and peers as well as charting and such:
getstats(name, [from], [to])- returns a timeseries within a given timeframegetstats_median(name, [from], [to])- returns a median value within a given timeframegetstats_average(name, [from], [to])- returns an average value within a given timeframegetstats_min(name, [from], [to])- returns a minimal value within a given timeframegetstats_max(name, [from], [to])- returns a maximal value within a given timeframeliststats()- return all timeseries names and types
It tracks excessively by design as we can decide later which timeseries are useful or not. The plugin is meant to be useful to gethering special insights on problems as well as optimizing fees and such.
This is work-in-progress with certain TODOs noted in the code.
Needs rebase