diff options
author | Diego <diegolparra@gmail.com> | 2015-11-27 14:51:53 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-11-27 14:51:53 -0300 |
commit | 2893c93d24d3f658af39910ddaabd671ac8247dd (patch) | |
tree | 7b9b0e382385761299323a95ad1bb5245514f81c /kamon-system-metrics/src/main/scala/kamon | |
parent | b019fb4beb90397c8498a3f126d14392eefe0ca3 (diff) | |
download | Kamon-2893c93d24d3f658af39910ddaabd671ac8247dd.tar.gz Kamon-2893c93d24d3f658af39910ddaabd671ac8247dd.tar.bz2 Kamon-2893c93d24d3f658af39910ddaabd671ac8247dd.zip |
= all: some clean up
Diffstat (limited to 'kamon-system-metrics/src/main/scala/kamon')
-rw-r--r-- | kamon-system-metrics/src/main/scala/kamon/system/sigar/ProcessCpuMetrics.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-system-metrics/src/main/scala/kamon/system/sigar/ProcessCpuMetrics.scala b/kamon-system-metrics/src/main/scala/kamon/system/sigar/ProcessCpuMetrics.scala index 4d61a66f..22c612e2 100644 --- a/kamon-system-metrics/src/main/scala/kamon/system/sigar/ProcessCpuMetrics.scala +++ b/kamon-system-metrics/src/main/scala/kamon/system/sigar/ProcessCpuMetrics.scala @@ -61,7 +61,7 @@ class ProcessCpuMetrics(sigar: Sigar, instrumentFactory: InstrumentFactory, logg val totalDiff = positiveSubtraction(currentProcCpu.getTotal, lastProcCpu.getTotal) val userDiff = positiveSubtraction(currentProcCpu.getUser, lastProcCpu.getUser) val systemDiff = positiveSubtraction(currentProcCpu.getSys, lastProcCpu.getSys) - val timeDiff = positiveSubtraction(currentProcCpu.getLastTime, lastProcCpu.getLastTime) + val timeDiff = currentProcCpu.getLastTime - lastProcCpu.getLastTime if (totalDiff == 0L) { if (timeDiff > 2000L) currentLoad = 0L |