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

fix container metrics #428

Merged

Conversation

justadogistaken
Copy link
Contributor

There are some metrics have been calculating incorrectly. Try to fix them in the pr.

  1. Rename MetricCPUNRdPeriodRateContainer to MetricCPUNRPeriodRateContainer.
  2. Try to assign l3_misses with OcrReadDrams when L3Misses is 0.
  3. Fill the lost metrics like MetricCPUThrottledTimeContainer/MetricCPUNrThrottledContainer/MetricCPUNrPeriodContainer in the case of v2 cgroups.
  4. Optimizing the calculation for MetricNetTcpRecvPacketsContainer/MetricNetTcpSendPacketsContainer/MetricNetTcpRecvBytesContainer/MetricNetTcpSendBytesContainer.

@justadogistaken justadogistaken added the workflow/merge-ready merge-ready: code is ready and can be merged label Jan 2, 2024
@justadogistaken justadogistaken self-assigned this Jan 2, 2024
@waynepeking348 waynepeking348 changed the title Fix container metrics fix container metrics Jan 2, 2024
waynepeking348
waynepeking348 previously approved these changes Jan 2, 2024
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: 47 lines in your changes are missing coverage. Please review.

Comparison is base (0a7ac56) 54.42% compared to head (9ea0225) 54.27%.
Report is 1 commits behind head on main.

Files Patch % Lines
...server/agent/metric/malachite/fetcher_calculate.go 59.70% 20 Missing and 7 partials ⚠️
pkg/metaserver/agent/metric/malachite/fetcher.go 69.56% 10 Missing and 4 partials ⚠️
pkg/util/syntax/lock.go 89.83% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #428      +/-   ##
==========================================
- Coverage   54.42%   54.27%   -0.15%     
==========================================
  Files         471      472       +1     
  Lines       51876    52025     +149     
==========================================
+ Hits        28231    28236       +5     
- Misses      20488    20649     +161     
+ Partials     3157     3140      -17     
Flag Coverage Δ
unittest 54.27% <72.67%> (-0.15%) ⬇️

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

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

@@ -125,7 +125,7 @@ const (
MetricStoreInsContainer = "cpu.store.ins.container"

MetricCPUNrThrottledRateContainer = MetricCPUNrThrottledContainer + Rate
MetricCPUNRdPeriodRateContainer = MetricCPUNrPeriodContainer + Rate
MetricCPUNRPeriodRateContainer = MetricCPUNrPeriodContainer + Rate
Copy link
Collaborator

Choose a reason for hiding this comment

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

use same format as above ("Nr") ?

@waynepeking348 waynepeking348 merged commit c87d038 into kubewharf:main Jan 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow/merge-ready merge-ready: code is ready and can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants