/* calculate idleness */
if (ipc.cali_mean != 0.0) {
runt = utime_since(&ipt->tps, &ipt->tpe);
- ipt->idleness = ipt->loops * ipc.cali_mean / runt;
+ if (runt)
+ ipt->idleness = ipt->loops * ipc.cali_mean / runt;
+ else
+ ipt->idleness = 0.0;
} else
ipt->idleness = 0.0;
}
return p * 100.0;
}
-void fio_idle_prof_cleanup(void)
+static void fio_idle_prof_cleanup(void)
{
if (ipc.ipts) {
free(ipc.ipts);