const char *ddir_str[] = { " READ", " WRITE" };
int i;
- log_info("Run status group %d (all jobs):\n", rs->groupid);
+ log_info("\nRun status group %d (all jobs):\n", rs->groupid);
for (i = 0; i <= DDIR_WRITE; i++) {
const int i2p = is_power_of_2(rs->kb_base);
bw_str = "MB";
}
- log_info(" bw (%s/s) : min=%5lu, max=%5lu, per=%3.2f%%,"
+ log_info(" bw (%s/s) : min=%5lu, max=%5lu, per=%3.2f%%,"
" avg=%5.02f, stdev=%5.02f\n", bw_str, min, max,
p_of_agg, mean, dev);
}
}
-static void show_lat(double *io_u_lat, int nr, const char **ranges,
- const char *msg)
+static int show_lat(double *io_u_lat, int nr, const char **ranges,
+ const char *msg)
{
- int new_line = 1, i, line = 0;
+ int new_line = 1, i, line = 0, shown = 0;
for (i = 0; i < nr; i++) {
if (io_u_lat[i] <= 0.0)
continue;
+ shown = 1;
if (new_line) {
if (line)
log_info("\n");
- log_info(" lat (%s): ", msg);
+ log_info(" lat (%s) : ", msg);
new_line = 0;
line = 0;
}
if (line == 5)
new_line = 1;
}
+
+ if (shown)
+ log_info("\n");
+
+ return shown;
}
static void show_lat_u(double *io_u_lat_u)
static void show_latencies(double *io_u_lat_u, double *io_u_lat_m)
{
show_lat_u(io_u_lat_u);
- log_info("\n");
show_lat_m(io_u_lat_m);
- log_info("\n");
}
void show_thread_status(struct thread_stat *ts, struct group_run_stats *rs)
if (ts->io_bytes[DDIR_WRITE])
show_ddir_status(rs, ts, DDIR_WRITE);
+ 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);
+
runtime = ts->total_run_time;
if (runtime) {
double runt = (double) runtime;
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/d: total=%lu/%lu/%lu, short=%lu/%lu/%lu\n",
+ log_info(" issued : total=r=%lu/w=%lu/d=%lu,"
+ " short=r=%lu/w=%lu/d=%lu\n",
ts->total_io_u[0], ts->total_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);
if (ts->continue_on_error) {
log_info(" errors : total=%lu, first_error=%d/<%s>\n",
ts->total_err_count,
else
log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
- if (calc_lat(&ts->lat_stat[ddir], &min, &max, &mean, &dev))
- log_info(";%lu;%lu;%f;%f", min, max, mean, dev);
- else
- log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
-
if (ts->clat_percentiles) {
len = calc_clat_percentiles(ts->io_u_plat[ddir],
ts->clat_stat[ddir].samples,
}
log_info(";%2.2f%%=%u", ts->percentile_list[i].u.f, ovals[i]);
}
+
+ if (calc_lat(&ts->lat_stat[ddir], &min, &max, &mean, &dev))
+ log_info(";%lu;%lu;%f;%f", min, max, mean, dev);
+ else
+ log_info(";%lu;%lu;%f;%f", 0UL, 0UL, 0.0, 0.0);
+
if (ovals)
free(ovals);
log_info(";%lu;%lu;%f%%;%f;%f", 0UL, 0UL, 0.0, 0.0, 0.0);
}
+static void show_thread_status_terse_v2(struct thread_stat *ts,
+ struct group_run_stats *rs)
+{
+ double io_u_dist[FIO_IO_U_MAP_NR];
+ double io_u_lat_u[FIO_IO_U_LAT_U_NR];
+ double io_u_lat_m[FIO_IO_U_LAT_M_NR];
+ double usr_cpu, sys_cpu;
+ int i;
+
+ /* General Info */
+ log_info("2;%s;%d;%d", 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;
+
+ usr_cpu = (double) ts->usr_time * 100 / runt;
+ sys_cpu = (double) ts->sys_time * 100 / runt;
+ } else {
+ usr_cpu = 0;
+ sys_cpu = 0;
+ }
+
+ 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);
+
+ log_info("\n");
+}
+
#define FIO_TERSE_VERSION "3"
-static void show_thread_status_terse(struct thread_stat *ts,
- struct group_run_stats *rs)
+static void show_thread_status_terse_v3(struct thread_stat *ts,
+ struct group_run_stats *rs)
{
double io_u_dist[FIO_IO_U_MAP_NR];
double io_u_lat_u[FIO_IO_U_LAT_U_NR];
log_info(";%s", ts->description);
}
+static void show_thread_status_terse(struct thread_stat *ts,
+ struct group_run_stats *rs)
+{
+ if (terse_version == 2)
+ show_thread_status_terse_v2(ts, rs);
+ else if (terse_version == 3)
+ show_thread_status_terse_v3(ts, rs);
+ else
+ log_err("fio: bad terse version!? %d\n", terse_version);
+}
+
static void sum_stat(struct io_stat *dst, struct io_stat *src, int nr)
{
double mean, S;
show_thread_status(ts, rs);
}
- if (!terse_output) {
- for (i = 0; i < groupid + 1; i++) {
- rs = &runstats[i];
-
- rs->groupid = i;
- if (is_backend)
- fio_server_send_gs(rs);
- else
- show_group_stats(rs);
- }
+ for (i = 0; i < groupid + 1; i++) {
+ rs = &runstats[i];
+ rs->groupid = i;
if (is_backend)
- fio_server_send_du();
- else
- show_disk_util(0);
-
- free_disk_util();
+ fio_server_send_gs(rs);
+ else if (!terse_output)
+ show_group_stats(rs);
}
+ if (is_backend)
+ fio_server_send_du();
+ else if (!terse_output)
+ show_disk_util(0);
+
+ free_disk_util();
+
free(runstats);
free(threadstats);
}