char *io_p, *bw_p, *iops_p;
int i2p;
+ assert(ddir_rw(ddir));
+
if (!ts->runtime[ddir])
return;
iops = (1000 * ts->total_io_u[ddir]) / runt;
iops_p = num2str(iops, 6, 1, 0);
- log_info(" %s: io=%sB, bw=%sB/s, iops=%s, runt=%6lumsec\n",
+ log_info(" %s: io=%sB, bw=%sB/s, iops=%s, runt=%6llumsec\n",
ddir_str[ddir], io_p, bw_p, iops_p,
ts->runtime[ddir]);
io_u_dist[1], io_u_dist[2],
io_u_dist[3], io_u_dist[4],
io_u_dist[5], io_u_dist[6]);
- log_info(" issued r/w: total=%lu/%lu, short=%lu/%lu\n",
+ log_info(" issued r/w/d: total=%lu/%lu/%lu, short=%lu/%lu/%lu\n",
ts->total_io_u[0], ts->total_io_u[1],
- ts->short_io_u[0], ts->short_io_u[1]);
+ ts->total_io_u[2],
+ ts->short_io_u[0], ts->short_io_u[1],
+ ts->short_io_u[2]);
stat_calc_lat_u(ts, io_u_lat_u);
stat_calc_lat_m(ts, io_u_lat_m);
show_latencies(io_u_lat_u, io_u_lat_m);
unsigned long long bw;
double mean, dev;
+ assert(ddir_rw(ddir));
+
bw = 0;
if (ts->runtime[ddir])
bw = ts->io_bytes[ddir] / ts->runtime[ddir];
- log_info(";%llu;%llu;%lu", ts->io_bytes[ddir] >> 10, bw,
+ log_info(";%llu;%llu;%llu", ts->io_bytes[ddir] >> 10, bw,
ts->runtime[ddir]);
if (calc_lat(&ts->slat_stat[ddir], &min, &max, &mean, &dev))
log_info(";%lu;%lu;%f%%;%f;%f", 0UL, 0UL, 0.0, 0.0, 0.0);
}
+#define FIO_TERSE_VERSION "2"
static void show_thread_status_terse(struct thread_stat *ts,
struct group_run_stats *rs)
double usr_cpu, sys_cpu;
int i;
- log_info("%s;%d;%d", ts->name, ts->groupid, ts->error);
-
+ /* General Info */
+ log_info("%s;%s;%d;%d", FIO_TERSE_VERSION, ts->name, ts->groupid,
+ ts->error);
+ /* Log Read Status */
show_ddir_status_terse(ts, rs, 0);
+ /* Log Write Status */
show_ddir_status_terse(ts, rs, 1);
+ /* CPU Usage */
if (ts->total_run_time) {
double runt = (double) ts->total_run_time;
log_info(";%f%%;%f%%;%lu;%lu;%lu", usr_cpu, sys_cpu, ts->ctx, ts->majf,
ts->minf);
+ /* Calc % distribution of IO depths, usecond, msecond latency */
stat_calc_dist(ts->io_u_map, ts_total_io_u(ts), io_u_dist);
stat_calc_lat_u(ts, io_u_lat_u);
stat_calc_lat_m(ts, io_u_lat_m);
+ /* Only show fixed 7 I/O depth levels*/
log_info(";%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%;%3.1f%%",
io_u_dist[0], io_u_dist[1], io_u_dist[2], io_u_dist[3],
io_u_dist[4], io_u_dist[5], io_u_dist[6]);
+ /* Microsecond latency */
for (i = 0; i < FIO_IO_U_LAT_U_NR; i++)
log_info(";%3.2f%%", io_u_lat_u[i]);
+ /* Millisecond latency */
for (i = 0; i < FIO_IO_U_LAT_M_NR; i++)
log_info(";%3.2f%%", io_u_lat_m[i]);
+ /* Additional output if continue_on_error set - default off*/
if (ts->continue_on_error)
log_info(";%lu;%d", ts->total_err_count, ts->first_error);
log_info("\n");
+ /* Additional output if description is set */
if (ts->description)
log_info(";%s", ts->description);
ts->io_u_lat_m[k] += td->ts.io_u_lat_m[k];
- for (k = 0; k <= DDIR_WRITE; k++) {
+ for (k = 0; k <= 2; k++) {
ts->total_io_u[k] += td->ts.total_io_u[k];
ts->short_io_u[k] += td->ts.short_io_u[k];
}
static void __add_log_sample(struct io_log *iolog, unsigned long val,
enum fio_ddir ddir, unsigned int bs,
- unsigned long time)
+ unsigned long t)
{
const int nr_samples = iolog->nr_samples;
}
iolog->log[nr_samples].val = val;
- iolog->log[nr_samples].time = time;
+ iolog->log[nr_samples].time = t;
iolog->log[nr_samples].ddir = ddir;
iolog->log[nr_samples].bs = bs;
iolog->nr_samples++;
unsigned long val, enum fio_ddir ddir,
unsigned int bs)
{
+ if (!ddir_rw(ddir))
+ return;
+
__add_log_sample(iolog, val, ddir, bs, mtime_since_now(&td->epoch));
}
void add_agg_sample(unsigned long val, enum fio_ddir ddir, unsigned int bs)
{
- struct io_log *iolog = agg_io_log[ddir];
+ struct io_log *iolog;
+
+ if (!ddir_rw(ddir))
+ return;
+ iolog = agg_io_log[ddir];
__add_log_sample(iolog, val, ddir, bs, mtime_since_genesis());
}
{
struct thread_stat *ts = &td->ts;
+ if (!ddir_rw(ddir))
+ return;
+
add_stat_sample(&ts->clat_stat[ddir], usec);
if (ts->clat_log)
{
struct thread_stat *ts = &td->ts;
+ if (!ddir_rw(ddir))
+ return;
+
add_stat_sample(&ts->slat_stat[ddir], usec);
if (ts->slat_log)
{
struct thread_stat *ts = &td->ts;
+ if (!ddir_rw(ddir))
+ return;
+
add_stat_sample(&ts->lat_stat[ddir], usec);
if (ts->lat_log)
struct timeval *t)
{
struct thread_stat *ts = &td->ts;
- unsigned long spent = mtime_since(&ts->stat_sample_time[ddir], t);
- unsigned long rate;
+ unsigned long spent, rate;
+
+ if (!ddir_rw(ddir))
+ return;
+ spent = mtime_since(&ts->stat_sample_time[ddir], t);
if (spent < td->o.bw_avg_time)
return;