-
Notifications
You must be signed in to change notification settings - Fork 46
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
Overhaul core Tracker: refactor statistics module #1229
Merged
josecelano
merged 9 commits into
torrust:develop
from
josecelano:1228-overhaul-core-tracker-refactor-statistics-module
Jan 31, 2025
Merged
Overhaul core Tracker: refactor statistics module #1229
josecelano
merged 9 commits into
torrust:develop
from
josecelano:1228-overhaul-core-tracker-refactor-statistics-module
Jan 31, 2025
Conversation
This file contains 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
This is the frist step in a bigger refactor. We will move statistics out of the tracker-core package into new packages. Statistics are not related to the tracker-core or enven handled there. That logic belongs to upper layers.
…in lib The statistics are only used at the higher levels: UDP and HTTP tracker. We will move them to new packages.
4f51ffd
to
9318842
Compare
Statistics are not in the package anymore.
Stats have been splited into HTTP and UDP stats. Parallel change, step 1: 1. [x] Start using HTTP Tracker Core Stats 2. [ ] Start using UDP Tracker Core Stats 3. [ ] Get metrics from HTTP and UDP Tracker Core Stats 4. [ ] Remove deprecate unified HTTP and UDP stats.
39449ab
to
5f08b2e
Compare
Parallel change, step 2: 1. [x] Start using HTTP Tracker Core Stats 2. [x] Start using UDP Tracker Core Stats 3. [ ] Get metrics from HTTP and UDP Tracker Core Stats 4. [ ] Remove deprecate unified HTTP and UDP stats.
…tats Stats have been splited into HTTP and UDP stats. Parallel change, step 3: 1. [x] Start using HTTP Tracker Core Stats 2. [x] Start using UDP Tracker Core Stats 3. [x] Get metrics from HTTP and UDP Tracker Core Stats 4. [ ] Remove deprecated unified HTTP and UDP stats.
Stats have been split into HTTP and UDP stats. Parallel change, step 4: 1. [x] Start using HTTP Tracker Core Stats 2. [x] Start using UDP Tracker Core Stats 3. [x] Get metrics from HTTP and UDP Tracker Core Stats 4. [x] Remove deprecated unified HTTP and UDP stats.
ACK fd8b57a |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Overhaul core Tracker: refactor statistics module.
Statistics have been split into three parts:
I have created a temporary directory (
src/packages/
) with the new packages. We need to create crates for those packages and move them to thesrc/packages/
dir.I didn't want to do that in this PR.
The app layers are a little bit different from what I described initially in the issue:
Initial design:
Final design:
I din't want to put stats in the
packages\http-protocol
because they are no part of the official HTTP tracker protocols. And I didn't want to put it in the axum server because it's code that can be re-used in other server implementations (using other frameworks).