Skip to content

Commit

Permalink
Merge pull request #84 from skrakau/test_usage_issue
Browse files Browse the repository at this point in the history
Fix uc calculation and add warning
  • Loading branch information
skrakau authored Jan 17, 2024
2 parents 3f3312b + f502187 commit c213bff
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ class CO2FootprintFactory implements TraceObserverFactory {
cpu_usage = nc * 100
}
// TODO how to handle double, Double datatypes for ceiling?
Double cpus_ceil = Math.ceil( cpu_usage / 100.0 as double )
Double uc = cpu_usage / (100.0 * cpus_ceil) as Double
if ( cpu_usage == 0.0 ) {
warnings << "The reported CPU usage is 0.0 for at last one task!"
}
Double uc = cpu_usage / (100.0 * nc) as Double

/**
* Factors of memory power usage
Expand Down

0 comments on commit c213bff

Please sign in to comment.