Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve resource duration accuracy. Fixes #12468 #12492

Merged
merged 1 commit into from
Feb 5, 2024

Commits on Jan 9, 2024

  1. fix(resources): improve ressource accounting. Fixes argoproj#12468

    The `.Values()` function rounds cpu ressources up to an integer. As a result, containers with small cpu requests (like the sidecar that requests 10m cores) are counted as requiring one full core, making the resources duration computation quite inaccurate.
    This changes uses `.MilliValues()` instead. The `MilliValues()` documentation mentions that this function may overflow, but the return value is stored in an int64, so the overflow will happen if a container requests more than 9*10^(15) of a ressource. I assume this should be fine for a while.
    
    Signed-off-by: Aloÿs Augustin <[email protected]>
    AloysAqemia committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    9d3bb42 View commit details
    Browse the repository at this point in the history