+ if (je->eta_sec != INT_MAX && je->elapsed_sec) {
+ perc = (double) je->elapsed_sec / (double) (je->elapsed_sec + je->eta_sec);
+ eta_to_str(eta_str, je->eta_sec);
+ }
+
+ if (eta_new_line_pending) {
+ eta_new_line_pending = 0;
+ linelen_last = 0;
+ p += sprintf(p, "\n");
+ }
+
+ p += sprintf(p, "Jobs: %d (f=%d)", je->nr_running, je->files_open);
+
+ /* rate limits, if any */
+ if (je->m_rate[0] || je->m_rate[1] || je->m_rate[2] ||
+ je->t_rate[0] || je->t_rate[1] || je->t_rate[2]) {
+ char *tr, *mr;
+
+ mr = num2str(je->m_rate[0] + je->m_rate[1] + je->m_rate[2],
+ je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
+ tr = num2str(je->t_rate[0] + je->t_rate[1] + je->t_rate[2],
+ je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
+
+ p += sprintf(p, ", %s-%s", mr, tr);
+ free(tr);
+ free(mr);
+ } else if (je->m_iops[0] || je->m_iops[1] || je->m_iops[2] ||
+ je->t_iops[0] || je->t_iops[1] || je->t_iops[2]) {
+ p += sprintf(p, ", %d-%d IOPS",
+ je->m_iops[0] + je->m_iops[1] + je->m_iops[2],
+ je->t_iops[0] + je->t_iops[1] + je->t_iops[2]);
+ }
+
+ /* current run string, % done, bandwidth, iops, eta */
+ 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;
+ int linelen;
+
+ if ((!je->eta_sec && !eta_good) || je->nr_ramp == je->nr_running ||
+ je->eta_sec == -1)
+ strcpy(perc_str, "-.-%");