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

koordlet: report system resource usage in node metric #1538

Merged
merged 1 commit into from
Aug 10, 2023
Merged

koordlet: report system resource usage in node metric #1538

merged 1 commit into from
Aug 10, 2023

Conversation

zwzhang0107
Copy link
Contributor

@zwzhang0107 zwzhang0107 commented Aug 9, 2023

Ⅰ. Describe what this PR does

Update system usage in node metric crd.
Add system usage collector in metric advisor. Read latest usage of node and pods from share state in context and calculate system usage, then saves in metric cache.
Although this can be calculate by node-sum(pod) from metric cache, but the time series are unaligned across different type of metric, which makes it hard to aggregate.

Ⅱ. Does this pull request fix one issue?

#991

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch coverage: 73.73% and project coverage change: +0.04% 🎉

Comparison is base (fe1ffd1) 64.78% compared to head (38634f4) 64.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1538      +/-   ##
==========================================
+ Coverage   64.78%   64.82%   +0.04%     
==========================================
  Files         347      348       +1     
  Lines       35376    35592     +216     
==========================================
+ Hits        22917    23072     +155     
- Misses      10780    10825      +45     
- Partials     1679     1695      +16     
Flag Coverage Δ
unittests 64.82% <73.73%> (+0.04%) ⬆️

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

Files Changed Coverage Δ
pkg/koordlet/metriccache/metric_types.go 58.13% <ø> (ø)
pkg/util/utils.go 30.39% <60.00%> (+3.21%) ⬆️
...ollectors/sysresource/system_resource_collector.go 67.03% <67.03%> (ø)
.../koordlet/statesinformer/impl/states_nodemetric.go 54.99% <67.14%> (+1.64%) ⬆️
...collectors/noderesource/node_resource_collector.go 67.44% <100.00%> (+2.00%) ⬆️
...r/collectors/podresource/pod_resource_collector.go 63.33% <100.00%> (+1.70%) ⬆️
pkg/koordlet/metricsadvisor/framework/context.go 70.21% <100.00%> (+70.21%) ⬆️
pkg/koordlet/metricsadvisor/metrics_advisor.go 86.56% <100.00%> (+0.20%) ⬆️

... and 2 files with indirect coverage changes

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

Signed-off-by: 佑祎 <zzw261520@alibaba-inc.com>
Copy link
Member

@saintube saintube left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Aug 10, 2023
@zwzhang0107 zwzhang0107 added this to the v1.3 milestone Aug 10, 2023
Copy link
Member

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FillZpp, saintube

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit 2dedee3 into koordinator-sh:main Aug 10, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants