diff --git a/build.sbt b/build.sbt index dff3f64..285dda8 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,4 @@ name := """sbt-energymonitor""" -version := "0.1-SNAPSHOT" organization := "com.47deg" ThisBuild / githubOrganization := "47degrees" diff --git a/src/main/scala/energymonitor/EnergyMonitorPlugin.scala b/src/main/scala/energymonitor/EnergyMonitorPlugin.scala index db1d051..bd1a41a 100644 --- a/src/main/scala/energymonitor/EnergyMonitorPlugin.scala +++ b/src/main/scala/energymonitor/EnergyMonitorPlugin.scala @@ -80,7 +80,7 @@ object EnergyMonitorPlugin extends AutoPlugin { val samples = diff.getPrimitiveSample() val duration = diff.getTimeElapsed() val totalJoules = samples.sum - val watts = totalJoules / duration.getSeconds().toDouble + val watts = totalJoules / (duration.toMillis().toDouble / 1000) f""" | During CI attempt ${attemptNumber}%d, this run consumed power from ${samples.size}%d CPU cores. |