}
for (i = 0; i < FIO_OUTPUT_NR; i++) {
- buf_output_flush(&output[i]);
- buf_output_free(&output[i]);
+ struct buf_output *out = &output[i];
+ log_info_buf(out->buf, out->buflen);
+ buf_output_clear(out);
+ buf_output_free(out);
}
log_info_flush();
add_stat_sample(&stat[ddir], rate);
- if (td->bw_log) {
+ if (log) {
unsigned int bs = 0;
if (td->o.min_bs[ddir] == td->o.max_bs[ddir])
next = min(td->o.iops_avg_time, td->o.bw_avg_time);
continue;
}
- if (td->bw_log && !per_unit_log(td->bw_log)) {
+ if (!td->bw_log ||
+ (td->bw_log && !per_unit_log(td->bw_log))) {
tmp = add_bw_samples(td, &now);
if (tmp < next)
next = tmp;
}
- if (td->iops_log && !per_unit_log(td->iops_log)) {
+ if (!td->iops_log ||
+ (td->iops_log && !per_unit_log(td->iops_log))) {
tmp = add_iops_samples(td, &now);
if (tmp < next)
next = tmp;