+
+ p += sprintf(p, "Jobs: %d (f=%d)", je->nr_running, je->files_open);
+ if (je->m_rate[0] || je->m_rate[1] || je->t_rate[0] || je->t_rate[1]) {
+ char *tr, *mr;
+
+ mr = num2str(je->m_rate[0] + je->m_rate[1], 4, 0, je->is_pow2, 8);
+ tr = num2str(je->t_rate[0] + je->t_rate[1], 4, 0, je->is_pow2, 8);
+ p += sprintf(p, ", CR=%s/%s KB/s", tr, mr);
+ free(tr);
+ free(mr);
+ } else if (je->m_iops[0] || je->m_iops[1] || je->t_iops[0] || je->t_iops[1]) {
+ p += sprintf(p, ", CR=%d/%d IOPS",
+ je->t_iops[0] + je->t_iops[1],
+ je->m_iops[0] + je->m_iops[1]);
+ }
+ if (je->eta_sec != INT_MAX && je->nr_running) {
+ char perc_str[32];
+ char *iops_str[DDIR_RWDIR_CNT];
+ char *rate_str[DDIR_RWDIR_CNT];
+ size_t left;
+ int l;
+ int ddir;
+
+ if ((!je->eta_sec && !eta_good) || je->nr_ramp == je->nr_running)
+ strcpy(perc_str, "-.-% done");
+ else {
+ double mult = 100.0;
+
+ if (je->nr_setting_up && je->nr_running)
+ mult *= (1.0 - (double) je->nr_setting_up / (double) je->nr_running);
+
+ eta_good = 1;
+ perc *= mult;
+ sprintf(perc_str, "%3.1f%% done", perc);
+ }
+
+ for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
+ rate_str[ddir] = num2str(je->rate[ddir], 5,
+ 1024, je->is_pow2, je->unit_base);
+ iops_str[ddir] = num2str(je->iops[ddir], 4, 1, 0, 0);
+ }
+
+ left = sizeof(output) - (p - output) - 1;
+
+ l = snprintf(p, left, ": [%s] [%s] [%s/%s/%s /s] [%s/%s/%s iops] [eta %s]",
+ je->run_str, perc_str, rate_str[DDIR_READ],
+ rate_str[DDIR_WRITE], rate_str[DDIR_TRIM],
+ iops_str[DDIR_READ], iops_str[DDIR_WRITE],
+ iops_str[DDIR_TRIM], eta_str);
+ p += l;
+ if (l >= 0 && l < linelen_last)
+ p += sprintf(p, "%*s", linelen_last - l, "");
+ linelen_last = l;
+
+ for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
+ free(rate_str[ddir]);
+ free(iops_str[ddir]);
+ }
+ }
+ p += sprintf(p, "\r");
+
+ printf("%s", output);
+
+ if (!eta_new_line_init) {
+ fio_gettime(&disp_eta_new_line, NULL);
+ eta_new_line_init = 1;
+ } else if (eta_new_line &&
+ mtime_since_now(&disp_eta_new_line) > eta_new_line * 1000) {
+ fio_gettime(&disp_eta_new_line, NULL);
+ eta_new_line_pending = 1;
+ }
+