]> arthur.barton.de Git - netdata.git/commitdiff
better work reporting
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 4 May 2014 12:53:54 +0000 (15:53 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 4 May 2014 12:53:54 +0000 (15:53 +0300)
plugins.d/loopsleepms.sh.inc

index daf308a1c20df798ad08a0336b4f04e4ccc96cc4..f75032ab4a2710281dcc853df4a9bb795fa9372a 100755 (executable)
@@ -52,7 +52,7 @@ loopsleepms() {
        LOOPSLEEPMS_LASTWORK=$((now - LOOPSLEEPMS_LASTRUN - LOOPSLEEPMS_LASTSLEEP))
        # echo "# last loop's work took $LOOPSLEEPMS_LASTWORK ms"
 
-       test $tellwork -eq 1 && echo >&2 " >>> DEBUG >>> WORK TOOK $LOOPSLEEPMS_LASTWORK ms"
+       test $tellwork -eq 1 && echo >&2 " >>> PERFORMANCE >>> WORK TOOK $LOOPSLEEPMS_LASTWORK ms ( $((LOOPSLEEPMS_LASTWORK * 100 / 1000)).$((LOOPSLEEPMS_LASTWORK % 10))% cpu )"
 
        # calculate ms to sleep
        local mstosleep=$((t - LOOPSLEEPMS_LASTWORK))