From f44c1d464a5a6583cd0b6e6068257988b5e5e403 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Jun 2006 14:46:24 +0200 Subject: [PATCH] [PATCH] Improve run_str[] updates and printing --- fio.c | 8 +++----- fio.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fio.c b/fio.c index 44463350..cc71a089 100644 --- a/fio.c +++ b/fio.c @@ -513,7 +513,6 @@ static struct io_u *get_io_u(struct thread_data *td) static inline void td_set_runstate(struct thread_data *td, int runstate) { - td->old_runstate = td->runstate; td->runstate = runstate; } @@ -1421,9 +1420,6 @@ static void check_str_update(struct thread_data *td) { char c = run_str[td->thread_number - 1]; - if (td->runstate == td->old_runstate) - return; - switch (td->runstate) { case TD_REAPED: c = '_'; @@ -1469,7 +1465,6 @@ static void check_str_update(struct thread_data *td) } run_str[td->thread_number - 1] = c; - td->old_runstate = td->runstate; } static void eta_to_str(char *str, int eta_sec) @@ -1614,6 +1609,9 @@ static void print_thread_status(void) eta_to_str(eta_str, eta_sec); } + if (!nr_running) + return; + printf("Threads now running (%d)", nr_running); if (m_rate || t_rate) printf(", commitrate %d/%dKiB/sec", t_rate, m_rate); diff --git a/fio.h b/fio.h index 1bc72a6f..671cb22f 100644 --- a/fio.h +++ b/fio.h @@ -153,7 +153,6 @@ struct thread_data { size_t orig_buffer_size; volatile int terminate; volatile int runstate; - volatile int old_runstate; enum fio_ddir ddir; unsigned int iomix; unsigned int ioprio; -- 2.25.1