Skip to content
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

feat(dfdaemon): add disk usage metrics #2912

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xujihui1985
Copy link

@xujihui1985 xujihui1985 commented Dec 3, 2023

Description

collect disk usage metrics for dfdaemon

Related Issue

Motivation and Context

currently there is no disk usage metrics for data directory usage, we need to monitor the disk dfdaemon used

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Merging #2912 (241ac78) into main (84cdd1e) will decrease coverage by 0.07%.
Report is 2 commits behind head on main.
The diff coverage is 0.00%.

❗ Current head 241ac78 differs from pull request most recent head d614d30. Consider uploading reports for the commit d614d30 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2912      +/-   ##
==========================================
- Coverage   51.06%   51.00%   -0.07%     
==========================================
  Files         161      161              
  Lines       21778    21797      +19     
==========================================
- Hits        11122    11118       -4     
- Misses       9999    10021      +22     
- Partials      657      658       +1     
Flag Coverage Δ
Object-compatibility-e2etests ∅ <ø> (∅)
e2etests ∅ <ø> (∅)
unittests 51.00% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/daemon/metrics/metrics.go 100.00% <ø> (ø)
client/daemon/storage/storage_manager.go 16.54% <0.00%> (-0.47%) ⬇️

... and 2 files with indirect coverage changes

metrics.DataUnReclaimedUsage.Set(float64(totalNotMarkedSize))
metrics.DataDiskGCThreshold.Set(float64(s.storeOption.DiskGCThreshold))
metrics.DataDiskGCThresholdPercent.Set(s.storeOption.DiskGCThresholdPercent)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The s.storeOption.DiskGCThresholdPercent and s.storeOption.DiskGCThreshold is static, we should not update them every time.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is used to record the threshold, so that we can display on the monitor, or there is better way to achieve that?

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.

None yet

2 participants