]> arthur.barton.de Git - netdata.git/commitdiff
fixed typo that resulted in negative fix values
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 9 Jul 2016 03:26:32 +0000 (06:26 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 9 Jul 2016 03:26:32 +0000 (06:26 +0300)
src/apps_plugin.c

index f6618b790e981871804c7e79be978b230fc4e577..a7eea6cdfe358ab6b3748913d536f71f825ecc50 100644 (file)
@@ -2267,8 +2267,10 @@ void normalize_data(struct target *root) {
 
        if(utime_fix_ratio > 1.0) utime_fix_ratio = 1.0;
        if(cutime_fix_ratio > 1.0) cutime_fix_ratio = 1.0;
+       // if(utime_fix_ratio < 0.0) utime_fix_ratio = 0.0;
+       // if(cutime_fix_ratio < 0.0) cutime_fix_ratio = 0.0;
 
-       if(global_utime && utime) {
+       if(global_stime && stime) {
                if(global_stime > stime + cstime) {
                        // everything we collected is short
                        cstime_fix_ratio =
@@ -2290,8 +2292,10 @@ void normalize_data(struct target *root) {
                stime_fix_ratio = 0.0;
        }
 
-       if(stime_fix_ratio > 1.0) stime_fix_ratio = 1.0;
+       if(stime_fix_ratio  > 1.0) stime_fix_ratio  = 1.0;
        if(cstime_fix_ratio > 1.0) cstime_fix_ratio = 1.0;
+       // if(stime_fix_ratio  < 0.0) stime_fix_ratio  = 0.0;
+       // if(cstime_fix_ratio < 0.0) cstime_fix_ratio = 0.0;
 
        // FIXME
        // we use cpu time to normalize page faults