Skip to content

feat(advisor): apply cpu headroom discount when power level is present #1034

Open
h-w-chen wants to merge 5 commits intokubewharf:mainfrom
h-w-chen:dev/pap-discounted-cpu-headroom
Open

feat(advisor): apply cpu headroom discount when power level is present #1034
h-w-chen wants to merge 5 commits intokubewharf:mainfrom
h-w-chen:dev/pap-discounted-cpu-headroom

Conversation

@h-w-chen
Copy link
Copy Markdown
Collaborator

@h-w-chen h-w-chen commented Nov 28, 2025

What type of PR is this?

Features

What this PR does / why we need it:

This PR allows power-ware plugin to enable reclaimed cpu headroom discount when the node's power level is of p1/p2/p3.

To ensure the power-aware plugin enabling to happen prior qos-aware cpu resource advisor being called to GetHeadroom, Init phase is put with cpu sub resource advisor up to qos-aware plugin.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 52.50000% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.38%. Comparing base (798dc28) to head (3f50bee).
⚠️ Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
.../headroomassembler/decorator/decorator_discount.go 54.83% 23 Missing and 5 partials ⚠️
...assembler/headroomassembler/decorator/decorator.go 35.29% 11 Missing ⚠️
...sor/plugin/qosaware/resource/cpu/advisor_helper.go 30.00% 6 Missing and 1 partial ⚠️
...ptions/sysadvisor/poweraware/power_aware_plugin.go 69.23% 4 Missing ⚠️
...sadvisor/plugin/qosaware/resource/resource_stub.go 0.00% 4 Missing ⚠️
.../agent/sysadvisor/plugin/poweraware/power_aware.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1034      +/-   ##
==========================================
+ Coverage   59.86%   60.38%   +0.51%     
==========================================
  Files         689      702      +13     
  Lines       65082    66792    +1710     
==========================================
+ Hits        38964    40335    +1371     
- Misses      21657    21886     +229     
- Partials     4461     4571     +110     
Flag Coverage Δ
unittest 60.38% <52.50%> (+0.51%) ⬆️

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.

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

@h-w-chen h-w-chen force-pushed the dev/pap-discounted-cpu-headroom branch 2 times, most recently from 8474476 to abe7d94 Compare December 1, 2025 23:42
@h-w-chen h-w-chen force-pushed the dev/pap-discounted-cpu-headroom branch 2 times, most recently from 1f97144 to cf4b24d Compare December 2, 2025 19:31
@h-w-chen h-w-chen changed the title WIP: pap: cpu headrrom discount feat(advisor): apply cpu headrrom discount when power level is present Dec 2, 2025
@h-w-chen h-w-chen added the workflow/need-review review: test succeeded, need to review label Dec 2, 2025
@h-w-chen h-w-chen changed the title feat(advisor): apply cpu headrrom discount when power level is present feat(advisor): apply cpu headroom discount when power level is present Dec 2, 2025
@h-w-chen h-w-chen requested a review from JulyWindK January 21, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow/need-review review: test succeeded, need to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants