Return zero NEUE when a region's demand is zero#97
Merged
GordStephen merged 2 commits intomainfrom Nov 4, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
==========================================
+ Coverage 83.02% 83.13% +0.11%
==========================================
Files 45 45
Lines 2309 2325 +16
==========================================
+ Hits 1917 1933 +16
Misses 392 392 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
scdhulipala
approved these changes
Nov 4, 2025
Contributor
scdhulipala
left a comment
There was a problem hiding this comment.
I remember making this change locally when I encountered this error in a project. Thanks for doing this, Gord.
sriharisundar
approved these changes
Nov 4, 2025
Member
sriharisundar
left a comment
There was a problem hiding this comment.
Can you please increment PRASCore to 0.8.1 and I can move the v0.8 tag after this is merged in?
Collaborator
Author
|
Done! |
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.
Right now, if any region has zero demand, NEUE is calculated as 0/0 which causes PRAS to throw an error and fail to report the metric. This would be more correct if EUE could be positive in that situation, but since it's impossible to have dropped load in a region without any load, reporting 0 NEUE seems like a reasonable alternative. This PR adds a check for the zero load condition and manually reports 0 NEUE in those cases.