kubewharf / katalyst-core

Katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. This is the core components in Katalyst system, including multiple agents and centralized components
Apache License 2.0
435 stars 107 forks source link

feat (sysadvisor): get power data served by metric store sourced from malachite realtime metric server #720

Closed h-w-chen closed 4 days ago

h-w-chen commented 2 weeks ago

What type of PR is this?

Feature: power aware advisor uses realtime power data originally from malachite. It has 3 major parts:

What this PR does / why we need it:

part of power node agent, it is needed for power aware plugin to get the current power usage and hence identify whether further measures required to limit the power consumption comparing with the desired power target.

Which issue(s) this PR fixes:

NA

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 60.65574% with 48 lines in your changes missing coverage. Please review.

Project coverage is 56.05%. Comparing base (4df549f) to head (6273a71). Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...tric/provisioner/malachite/realtime_provisioner.go 50.81% 25 Missing and 5 partials :warning:
...etric/provisioner/malachite/client/client_power.go 73.52% 6 Missing and 3 partials :warning:
...gin/poweraware/reader/metric_store_power_reader.go 65.21% 7 Missing and 1 partial :warning:
.../agent/sysadvisor/plugin/poweraware/power_aware.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #720 +/- ## ========================================== + Coverage 55.91% 56.05% +0.13% ========================================== Files 593 597 +4 Lines 67813 67958 +145 ========================================== + Hits 37918 38094 +176 + Misses 25859 25807 -52 - Partials 4036 4057 +21 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/720/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/720/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `56.05% <60.65%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.