Skip to content

change cpuacct.stat to cpuacct.usage#248

Merged
koordinator-bot[bot] merged 5 commits intokoordinator-sh:mainfrom
XIAOMI-CloudNative:fix/cpuacct
Jun 15, 2022
Merged

change cpuacct.stat to cpuacct.usage#248
koordinator-bot[bot] merged 5 commits intokoordinator-sh:mainfrom
XIAOMI-CloudNative:fix/cpuacct

Conversation

@j4ckstraw
Copy link
Contributor

Ⅰ. Describe what this PR does

change cpuacct.stat to cpuacct.usage

Ⅱ. Does this pull request fix one issue?

fixes #221

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@jasonliu747
Copy link
Member

@j4ckstraw thanks for your contribution. Please run make lint and make test before committing code.

@j4ckstraw

This comment was marked as outdated.

@hormes
Copy link
Member

hormes commented Jun 14, 2022

@j4ckstraw seems that GetPodCgroupCPUAcctProcStatPath is not completely replaced, please grep the entire project

@j4ckstraw
Copy link
Contributor Author

@j4ckstraw seems that GetPodCgroupCPUAcctProcStatPath is not completely replaced, please grep the entire project

there are no GetPodCgroupCPUAcctProcStatPath found.

$ grep -i GetPodCgroupCPUAcctProcStatPath -r .
$ git grep GetPodCgroupCPUAcctProcStatPath

@jasonliu747
Copy link
Member

@j4ckstraw Please fetch the latest code and rebase. This would solve the problem.

@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #248 (3c2f031) into main (d139458) will increase coverage by 0.65%.
The diff coverage is 71.87%.

@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
+ Coverage   58.37%   59.02%   +0.65%     
==========================================
  Files         103      103              
  Lines        9575     9567       -8     
==========================================
+ Hits         5589     5647      +58     
+ Misses       3521     3457      -64     
+ Partials      465      463       -2     
Flag Coverage Δ
unittests 59.02% <71.87%> (+0.65%) ⬆️

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

Impacted Files Coverage Δ
pkg/koordlet/metricsadvisor/collector.go 9.69% <0.00%> (ø)
pkg/util/system/cgroup_resource.go 0.00% <ø> (ø)
pkg/util/stat.go 83.33% <93.33%> (+1.19%) ⬆️
pkg/koordlet/metricsadvisor/be_collector.go 68.81% <100.00%> (ø)
pkg/util/container.go 70.62% <100.00%> (+40.00%) ⬆️
pkg/util/pod.go 25.50% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d139458...3c2f031. Read the comment docs.

@j4ckstraw j4ckstraw force-pushed the fix/cpuacct branch 2 times, most recently from e45a3c8 to 62a7847 Compare June 14, 2022 07:53
@jasonliu747
Copy link
Member

/cc @stormgbs @saintube @zwzhang0107

see koordinator-sh#221

Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
@saintube
Copy link
Member

/lgtm

Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm

@jasonliu747 jasonliu747 modified the milestone: v0.5 Jun 15, 2022
@hormes
Copy link
Member

hormes commented Jun 15, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes, jasonliu747

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

The pull request process is described here

Details 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 bff21a8 into koordinator-sh:main Jun 15, 2022
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.

[proposal] use cpuacct.usage instead of cpuacct.stat

4 participants