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

src: initialize prev_idle_time_ on ThreadMetrics #156

Merged
merged 1 commit into from
Jul 24, 2024

Commits on Jul 24, 2024

  1. src: initialize prev_idle_time_ on ThreadMetrics

    Make sure `prev_idle_time_` is initialized in the
    `ThreadMetrics::ThreadMetrics(SharedEnvInst envinst)` constructor
    so the loop utilization calculations are correct, otherwise the default
    value 0 is used which may lead to meaningless huge values (greater than
    1 for the matter).
    No need to initialize this value in the
    `ThreadMetrics::ThreadMetrics(uint64_t thread_id)` as this is only used
    in the `EnvInst` constructor on which having a value of 0 makes sense.
    
    PR-URL: #156
    Reviewed-by: Trevor Norris <trev.norris@gmail.com>
    Reviewed-by: Juan José Arboleda <soyjuanarbol@gmail.com>
    santigimeno committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    5da27a2 View commit details
    Browse the repository at this point in the history