Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: Add clboss-channel-stats to summarize fee income performance #226

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

ksedgwic
Copy link
Collaborator

@ksedgwic ksedgwic commented Jul 31, 2024

This script produces a summary of channel routing stats, sorted by performance:

  • Displays PeerID, SCID, and Alias for each channel
  • Sorts first by net fees (income - expenses) (descending)
  • Then sorts by "Success Per Day" (SPD) (descending)
  • Then sorts by Age in days (ascending)

The channels at the top of the list are good, the ones at the bottom are bad.

@ksedgwic ksedgwic force-pushed the 2024-07-clboss-channel-stats branch from b2ce357 to 82446d0 Compare August 1, 2024 18:14
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, do you think that this is too hard to include inside CLBOSS?

@ksedgwic
Copy link
Collaborator Author

ksedgwic commented Aug 2, 2024 via email

peers = {}
for channel in channels_data:
# Skip channels that are closed
if channel.get("state") == "ONCHAIN":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd skip all states except CHANNELD_NORMAL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, done

This script produces a summary of channel stats, sorted by routing performance:

- Displays PeerID, SCID, and Alias for each channel
- Sorts first by net fees (income - expenses) (descending)
- Then sorts by "Success Per Day" (SPD) (descending)
- Then sorts by Age in days (ascending)

The channels at the top of the list are good, the ones at the bottom are bad.
@ksedgwic ksedgwic force-pushed the 2024-07-clboss-channel-stats branch from 82446d0 to 4f60685 Compare August 2, 2024 18:59
@ksedgwic ksedgwic merged commit 5bd23f2 into ZmnSCPxj:master Aug 19, 2024
1 check passed
@ksedgwic ksedgwic mentioned this pull request Sep 25, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants