#include "json.h"
#include "lib/getrusage.h"
#include "idletime.h"
+#include "lib/pow2.h"
struct fio_mutex *stat_mutex;
case BLOCK_STATE_TRIM_FAILURE:
return 2;
default:
+ /* Silence compile warning on some BSDs and have a return */
assert(0);
+ return -1;
}
}
if (spent < td->o.bw_avg_time)
return;
+ td_io_u_lock(td);
+
/*
* Compute both read and write rates for the interval.
*/
}
fio_gettime(&td->bw_sample_time, NULL);
+ td_io_u_unlock(td);
}
void add_iops_sample(struct thread_data *td, enum fio_ddir ddir, unsigned int bs,
if (spent < td->o.iops_avg_time)
return;
+ td_io_u_lock(td);
+
/*
* Compute both read and write rates for the interval.
*/
}
fio_gettime(&td->iops_sample_time, NULL);
+ td_io_u_unlock(td);
}
void stat_init(void)