-
Notifications
You must be signed in to change notification settings - Fork 48
chore(deps): bump tokio from 1.45.1 to 1.46.0 #1598
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
Closed
Closed
Conversation
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
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.45.1 to 1.46.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.45.1...tokio-1.46.0) --- updated-dependencies: - dependency-name: tokio dependency-version: 1.46.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1598 +/- ##
===========================================
- Coverage 85.52% 85.50% -0.02%
===========================================
Files 289 289
Lines 22842 22842
Branches 22842 22842
===========================================
- Hits 19535 19532 -3
- Misses 2986 2991 +5
+ Partials 321 319 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
grmbyrn
pushed a commit
to grmbyrn/torrust-tracker
that referenced
this pull request
Jul 3, 2025
…time metric and update atomic It also fixes a division by zero bug when the metrics is updated before the counter for number of conenctions has been increased. It only avoid the division by zero. I will propoerly fixed with independent request counter for the moving average calculation.
grmbyrn
pushed a commit
to grmbyrn/torrust-tracker
that referenced
this pull request
Jul 3, 2025
… time metric and update atomic It also fixes a division by zero bug when the metrics is updated before the counter for number of conenctions has been increased. It only avoid the division by zero. I will propoerly fixed with independent request counter for the moving average calculation.
grmbyrn
pushed a commit
to grmbyrn/torrust-tracker
that referenced
this pull request
Jul 3, 2025
…ime metric and update atomic It also fixes a division by zero bug when the metrics is updated before the counter for number of conenctions has been increased. It only avoid the division by zero. I will propoerly fixed with independent request counter for the moving average calculation.
grmbyrn
pushed a commit
to grmbyrn/torrust-tracker
that referenced
this pull request
Jul 3, 2025
b423bf6 refactor: [torrust#1589] improve readability of UDP performance metrics race condition test (Jose Celano) dc8d4a9 test: [torrust#1589] add race condition test for UDP performance metrics (Jose Celano) a9acca5 refactor: [torrust#1589] rename methods and remove unused code (Jose Celano) 4c082fa refactor: [torrust#1589] make methods private (Jose Celano) cd57f7a fix: [torrust#1589] use average aggregation for UDP processing time metrics (Jose Celano) ba3d8a9 fix: format (Jose Celano) caa69ae test: [torrust#1589] remove uneeded test (Jose Celano) f402b02 chore: remove deprecated comment (Jose Celano) 8fbcf90 refactor(metrics): extract collect_matching_samples to Metric<T> impl (Jose Celano) 384b887 feat(metrics): [torrust#1589] add Avg (average) aggregate function (Jose Celano) ed5f1e6 fix: [torrust#1589] add dedicated metric for UDP request processing in moving average calculation (Jose Celano) 164de92 refactor: [torrust#1589] remvoe duplicate code (Jose Celano) 1c13b12 fix: [torrust#1589] partially. Moving average calculated for each time series (Jose Celano) 47c2949 refactor: [torrust#1598] make recalculate udp avg scrape processing time metric and update atomic (Jose Celano) 59fbb39 refactor: [torrust#1598] make recalculate udp avg announce processing time metric and update atomic (Jose Celano) d50948e refactor: [torrust#1598] make recalculate udp avg connect processing time metric and update atomic (Jose Celano) e6c05b6 refactor(udp-tracker-server): [torrust#1589] move average processing time calculation from Repository to Metrics (Jose Celano) Pull request description: Fix bug: Wrong UDP Average Connect Time metric. ### Context See torrust#1589. ### Subtasks - [x] Read, recalculate, and update average should be atomic. - [x] Average should be calculated for a time series (label set). We are mixing series: we update the average using a label set (segregate average), but count the requests for the average globally (not segregated). - [x] Add a new metric to count requests for the moving average. This counter is also increased atomically when the new average is updated. - [x] Fix global (all trackers, no labels) value for the average. It should be the average of all average samples, not the `SUM`. - [x] Add new average aggregate function to the `metrics` package. - [x] Add tests: - [x] With two times series. Two trackers running on different ports (`6868`, `6969`) - [x] For race conditions, running multiple requests in parallel. To ensure the average is accurate after many iterations. ### How to test 1. Run the tracker: `cargo run` 2. Simulate one `announce` request per UDP server ``` cargo run -p torrust-tracker-client --bin udp_tracker_client announce udp://127.0.0.1:6868 000620bbc6c52d5a96d98f6c0f1dfa523a40df82 | jq cargo run -p torrust-tracker-client --bin udp_tracker_client announce udp://127.0.0.1:6969 000620bbc6c52d5a96d98f6c0f1dfa523a40df82 | jq ``` 3. Check metrics In the labelled metrics, there should be two metric samples like these: curl -s "http://localhost:1212/api/v1/metrics?token=MyAccessToken&format=prometheus" ``` # HELP udp_tracker_server_performance_avg_processing_time_ns Average time to process a UDP request in nanoseconds # TYPE udp_tracker_server_performance_avg_processing_time_ns gauge udp_tracker_server_performance_avg_processing_time_ns{request_kind="announce",server_binding_address_ip_family="inet",server_binding_address_ip_type="plain",server_binding_ip="0.0.0.0",server_binding_port="6868",server_binding_protocol="udp"} 54773 udp_tracker_server_performance_avg_processing_time_ns{request_kind="connect",server_binding_address_ip_family="inet",server_binding_address_ip_type="plain",server_binding_ip="0.0.0.0",server_binding_port="6868",server_binding_protocol="udp"} 40326 udp_tracker_server_performance_avg_processing_time_ns{request_kind="announce",server_binding_address_ip_family="inet",server_binding_address_ip_type="plain",server_binding_ip="0.0.0.0",server_binding_port="6969",server_binding_protocol="udp"} 66063.71428571429 udp_tracker_server_performance_avg_processing_time_ns{request_kind="connect",server_binding_address_ip_family="inet",server_binding_address_ip_type="plain",server_binding_ip="0.0.0.0",server_binding_port="6969",server_binding_protocol="udp"} 43497.71428571428 ``` In the global aggregated metrics: curl -s "http://localhost:1212/api/v1/metrics?token=MyAccessToken&format=prometheus" The values should be the average of the server's averages: ``` udp_avg_connect_processing_time_ns 41911 udp_avg_announce_processing_time_ns 60418 udp_avg_scrape_processing_time_ns 0 ``` 41911 = (40326 + 43497.71428571428)/2 = 41911,857142857 60418 = (54773 + 66063.71428571429)/2 = 60418,357142857 The values are rounded because we use a u64 for the global aggregated metrics. ACKs for top commit: josecelano: ACK b423bf6 Tree-SHA512: 3d2544860838d0817f0700587af87bc6890eaef596db6cc15d02340e2ad9e459e425d2589d4e5c542ec3f0fc250b6e49fb4964be343e670a13d1de3a59b8f712
Contributor
Author
|
Superseded by #1599. |
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.
Bumps tokio from 1.45.1 to 1.46.0.
Release notes
Sourced from tokio's releases.
... (truncated)
Commits
3f1f268chore: prepare Tokio v1.46.0 (#7437)3e890ccrt(unstable): add spawnLocationtoTaskMeta(#7417)69290a6net: deriveClonefornet::unix::SocketAddr(#7422)e2b1758fuzz: cfg fuzz tests under cfg(test) (#7428)b7a75b5net: updateAsRawFddoc link to current Rust stdlib location (#7429)6b705b3net: allowpipe::OpenOptions::read_writeon Android (#7426)3636fd0net: fix broken link ofRawFdinTcpSocketdocs (#7416)2506c9fbenches: revert "properly gate unix benches" (#7412)b3a1448sync: improve docs oftokio_util::sync::CancellationToken(#7408)013f323docs: add a missing panic scenario oftime::advance(#7394)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)