Skip to content

Add a new metric to count peers reverting Completed state#1566

Merged
josecelano merged 7 commits into
torrust:developfrom
josecelano:1534-overhaul-stats-clients-can-artificially-inflate-download-counter-by-repeating-announce-and-completed-events
Jun 9, 2025
Merged

Add a new metric to count peers reverting Completed state#1566
josecelano merged 7 commits into
torrust:developfrom
josecelano:1534-overhaul-stats-clients-can-artificially-inflate-download-counter-by-repeating-announce-and-completed-events

Conversation

@josecelano
Copy link
Copy Markdown
Member

@josecelano josecelano commented Jun 9, 2025

Add a new metric to count peers reverting the Completed state.

Subtasks

  • Refactor swarm-coordination-registry package: rename types, variables, and constants to follow the package's new name.
  • Add the new metric: swarm_coordination_registry_peers_completed_state_reverted_total

…om complete to any other state

The metric is:

```
swarm_coordination_registry_peers_completed_state_reverted_total 1
```
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 88.13559% with 14 lines in your changes missing coverage. Please review.

Project coverage is 83.97%. Comparing base (0e3a305) to head (7be0366).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
...rdination-registry/src/statistics/event/handler.rs 86.79% 7 Missing ⚠️
...dination-registry/src/statistics/event/listener.rs 0.00% 4 Missing and 1 partial ⚠️
...egistry/src/statistics/activity_metrics_updater.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1566      +/-   ##
===========================================
+ Coverage    83.95%   83.97%   +0.02%     
===========================================
  Files          282      282              
  Lines        20250    20298      +48     
  Branches     20250    20298      +48     
===========================================
+ Hits         17001    17046      +45     
  Misses        2954     2954              
- Partials       295      298       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano
Copy link
Copy Markdown
Member Author

ACK 7be0366

@josecelano josecelano marked this pull request as ready for review June 9, 2025 12:43
@josecelano josecelano merged commit d949e48 into torrust:develop Jun 9, 2025
21 checks passed
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.

Overhaul stats: Clients can artificially inflate download counter by repeating announce and completed events

1 participant