X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=2ab5f1adffd49a203ba6d0fd567e891fbc27f613;hp=a02c5829a494cf330a9394e731c0802b83b8b567;hb=c857cfebb50209b950cbc88b4f74714fdf5be75f;hpb=9602d8df781db46f78a25a02abc75de03a69b6a8 diff --git a/stat.c b/stat.c index a02c5829..2ab5f1ad 100644 --- a/stat.c +++ b/stat.c @@ -782,11 +782,12 @@ static void show_thread_status_terse_v3(struct thread_stat *ts, /* 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 (strlen(ts->description)) log_info(";%s", ts->description); + + log_info("\n"); } static void show_thread_status_terse(struct thread_stat *ts, @@ -1044,10 +1045,11 @@ void show_run_stats(void) bw = 0; if (ts->runtime[j]) { - unsigned long runt; + unsigned long runt = ts->runtime[j]; + unsigned long long kb; - runt = ts->runtime[j]; - bw = ts->io_bytes[j] / runt; + kb = ts->io_bytes[j] / rs->kb_base; + bw = kb * 1000 / runt; } if (bw < rs->min_bw[j]) rs->min_bw[j] = bw; @@ -1059,16 +1061,12 @@ void show_run_stats(void) } for (i = 0; i < groupid + 1; i++) { - unsigned long max_run[2]; - rs = &runstats[i]; - max_run[0] = rs->max_run[0]; - max_run[1] = rs->max_run[1]; if (rs->max_run[0]) - rs->agg[0] = (rs->io_kb[0] * 1000) / max_run[0]; + rs->agg[0] = (rs->io_kb[0] * 1000) / rs->max_run[0]; if (rs->max_run[1]) - rs->agg[1] = (rs->io_kb[1] * 1000) / max_run[1]; + rs->agg[1] = (rs->io_kb[1] * 1000) / rs->max_run[1]; } /* @@ -1343,7 +1341,7 @@ void add_iops_sample(struct thread_data *td, enum fio_ddir ddir, if (td->iops_log) add_log_sample(td, td->iops_log, iops, ddir, 0); - td->stat_io_bytes[ddir] = td->this_io_bytes[ddir]; + td->stat_io_blocks[ddir] = td->this_io_blocks[ddir]; } fio_gettime(&td->iops_sample_time, NULL);