+ double cpu_load;
+ if (host->p_cpu->m_speedPeak == 0)
+ // Some users declare a pstate of speed 0 flops (eg to model boot time).
+ // We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
+ cpu_load = 1;
+ else
+ cpu_load = lmm_constraint_get_usage(host->p_cpu->getConstraint()) / host->p_cpu->m_speedPeak;