Skip to content

Conversation

@GordStephen
Copy link
Collaborator

@GordStephen GordStephen commented Nov 4, 2025

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.

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.13%. Comparing base (ab84b53) to head (e2182b5).
⚠️ Report is 1 commits behind head on main.

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.
📢 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.

Copy link
Contributor

@scdhulipala scdhulipala left a comment

Choose a reason for hiding this comment

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

I remember making this change locally when I encountered this error in a project. Thanks for doing this, Gord.

Copy link
Member

@sriharisundar sriharisundar left a comment

Choose a reason for hiding this comment

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

Can you please increment PRASCore to 0.8.1 and I can move the v0.8 tag after this is merged in?

@GordStephen
Copy link
Collaborator Author

Done!

@GordStephen GordStephen merged commit fbde94e into main Nov 4, 2025
33 checks passed
@sriharisundar sriharisundar deleted the gs/neue-zerodemand-fix branch November 21, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants