Change-Id: Idd6da9f0b1cdb9e6a81e75c397571fdbc3b26978
return 0;
}
+ if (ced->cpu_time < ced->cpu_time_last) {
+ _D_PROC(ds->process, "cpu_time < cpu_time_last, ignoring sample");
+ return 0;
+ }
+
cpu_usage = (double) (ced->cpu_time - ced->cpu_time_last) / (ced->measure_time - ced->measure_time_last);
ret = data_source_add_sample(ds, ST_DOUBLE, &cpu_usage, rd_global->v[0]);
return 0;
}
+ if (ied->io_bytes < ied->io_bytes_last) {
+ _D_PROC(ds->process, "io_bytes < io_bytes_last, ignoring sample");
+ return 0;
+ }
+
io_rate = (double) (ied->io_bytes - ied->io_bytes_last) /
(ied->measure_time - ied->measure_time_last);