Overhaul stats: add peer inactivity metrics to torrent-repository package#1530
Merged
Conversation
The metric is added to the `torrent-repository` package.
The metric in Prometheus format:
```
torrent_repository_peers_inactive_total{} 0
```
It was not included as a new label in the number of peers because it can't be calculated from current events.
New inactivity events could have been added but the solution was much
more complex than this and having two metrics counting peers is not so
bad.
The discarded alternative was addinga new label por satte (`active`,
`inactive`).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1530 +/- ##
===========================================
- Coverage 84.35% 83.92% -0.43%
===========================================
Files 265 267 +2
Lines 19043 19207 +164
Branches 19043 19207 +164
===========================================
+ Hits 16063 16120 +57
- Misses 2702 2811 +109
+ Partials 278 276 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f3056ef to
677deac
Compare
Member
Author
|
ACK 677deac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds two new metrics:
torrent_repository_inactive_peers_total: The number of inactive peers across all torrents.torrent_repository_inactive_torrents_total: The number of inactive torrents (inactive swarms).