bugfix : propagate avg_power min/max in CPU and RAM power consumption#481
Merged
bugfix : propagate avg_power min/max in CPU and RAM power consumption#481
Conversation
…ption In ComponentCPU.model_power_consumption() and ComponentRAM.model_power_consumption(), the returned ImpactFactor used avg_power.value for all three of value, min, and max. This collapsed the power uncertainty range to a single point, causing use-phase min/max impacts for servers and cloud instances to be identical to the central value regardless of workload uncertainty. For CPU, the consumption profile is now evaluated at time_workload.min and time_workload.max in addition to time_workload.value, and the results are passed as min/max to set_completed(). This properly captures the power uncertainty introduced by workload variation. For RAM, apply_consumption_profile() is load-independent (power = factor × capacity), so min/max equal value. The return is still corrected to use avg_power.min and avg_power.max for semantic correctness and to propagate any bounds set upstream. The TODO comment marking this as unimplemented is removed.
Signed-off-by: Julien Nioche <[email protected]>
Shillaker
approved these changes
Feb 24, 2026
Collaborator
Author
|
thanks @Shillaker & @jonperron |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
ComponentCPU.model_power_consumption()andComponentRAM.model_power_consumption(), the returned ImpactFactor usedavg_power.valuefor all three of value, min, and max. This collapsed the power uncertainty range to a single point, causing use-phase min/max impacts for servers and cloud instances to be identical to the central value regardless of workload uncertainty.For CPU, the consumption profile is now evaluated at time_workload.min and time_workload.max in addition to time_workload.value, and the results are passed as min/max to
set_completed(). This properly captures the power uncertainty introduced by workload variation.For RAM,
apply_consumption_profile()is load-independent (power = factor × capacity), so min/max equal value. The return is still corrected to useavg_power.minandavg_power.maxfor semantic correctness and to propagate any bounds set upstream.The TODO comment marking this as unimplemented is removed.