Skip to content

feat: bump version to 1.2.18 and fix CPU process stats collection#1737

Merged
gaius-qi merged 4 commits intomainfrom
feature/bbr
Mar 19, 2026
Merged

feat: bump version to 1.2.18 and fix CPU process stats collection#1737
gaius-qi merged 4 commits intomainfrom
feature/bbr

Conversation

@gaius-qi
Copy link
Copy Markdown
Member

Description

This pull request introduces improvements to system resource monitoring, adds container-awareness to host announcements, and enhances logging for debugging. The changes include making CPU monitoring asynchronous, improving accuracy in CPU usage calculations, and ensuring cgroup stats are included when running in a container environment. Additionally, the pull request updates workspace versions and improves error messages.

Resource monitoring improvements:

  • Refactored the CPU struct in dragonfly-client-util/src/sysinfo/cpu.rs to store physical and logical core counts, and updated methods (get_stats, get_process_stats) to be asynchronous for more accurate CPU usage measurements. CPU usage calculations now account for logical cores, and debug logging was added for detailed stats. [1] [2] [3] [4] [5] [6]
  • Improved disk, memory, and network monitoring by adding debug logging for bandwidth, memory usage, and network stats in their respective files. [1] [2] [3] [4] [5] [6]

Container environment awareness:

  • Updated SchedulerAnnouncer in dragonfly-client/src/announcer/mod.rs to detect if running in a container and include cgroup CPU and memory stats in host announcements, using new fields and logic. [1] [2] [3] [4] [5]

Dependency and version updates:

  • Bumped workspace and dependency versions from 1.2.17 to 1.2.18 in Cargo.toml for all relevant crates. [1] [2]

Error handling improvements:

  • Improved overloaded server error messages in dragonfly-client/src/grpc/dfdaemon_download.rs for clarity.

Related Issue

Motivation and Context

Screenshots (if appropriate)

@gaius-qi gaius-qi added this to the v2.5.0 milestone Mar 19, 2026
@gaius-qi gaius-qi self-assigned this Mar 19, 2026
@gaius-qi gaius-qi added the enhancement New feature or request label Mar 19, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 27.27273% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.79%. Comparing base (7d33221) to head (2ca4990).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dragonfly-client-util/src/sysinfo/cpu.rs 43.75% 18 Missing ⚠️
dragonfly-client-util/src/sysinfo/memory.rs 39.13% 14 Missing ⚠️
dragonfly-client/src/announcer/mod.rs 0.00% 11 Missing ⚠️
dragonfly-client-util/src/sysinfo/disk.rs 0.00% 10 Missing ⚠️
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% 6 Missing ⚠️
dragonfly-client-util/src/ratelimiter/bbr.rs 50.00% 4 Missing ⚠️
dragonfly-client/src/grpc/dfdaemon_download.rs 0.00% 3 Missing ⚠️
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% 3 Missing ⚠️
dragonfly-client-util/src/sysinfo/network.rs 0.00% 2 Missing ⚠️
dragonfly-client/src/grpc/middleware.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1737      +/-   ##
==========================================
- Coverage   46.86%   46.79%   -0.07%     
==========================================
  Files          87       87              
  Lines       24816    24883      +67     
==========================================
+ Hits        11629    11643      +14     
- Misses      13187    13240      +53     
Files with missing lines Coverage Δ
dragonfly-client/src/grpc/middleware.rs 25.80% <0.00%> (ø)
dragonfly-client-util/src/sysinfo/network.rs 30.50% <0.00%> (-0.53%) ⬇️
dragonfly-client/src/grpc/dfdaemon_download.rs 5.02% <0.00%> (-0.02%) ⬇️
dragonfly-client/src/grpc/dfdaemon_upload.rs 0.00% <0.00%> (ø)
dragonfly-client-util/src/ratelimiter/bbr.rs 79.20% <50.00%> (-0.42%) ⬇️
dragonfly-client/src/bin/dfdaemon/main.rs 0.00% <0.00%> (ø)
dragonfly-client-util/src/sysinfo/disk.rs 0.00% <0.00%> (ø)
dragonfly-client/src/announcer/mod.rs 0.00% <0.00%> (ø)
dragonfly-client-util/src/sysinfo/memory.rs 25.42% <39.13%> (-0.11%) ⬇️
dragonfly-client-util/src/sysinfo/cpu.rs 21.23% <43.75%> (+6.02%) ⬆️

... and 1 file with indirect coverage changes

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

@gaius-qi gaius-qi enabled auto-merge (squash) March 19, 2026 13:45
@gaius-qi gaius-qi changed the title Feature/bbr feat: bump version to 1.2.18 and fix CPU process stats collection Mar 19, 2026
@gaius-qi gaius-qi merged commit f27be76 into main Mar 19, 2026
9 checks passed
@gaius-qi gaius-qi deleted the feature/bbr branch March 19, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants