X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=eta.c;h=fdf55c5ab74d260d7c8aa1be842002c5a75b1d25;hp=075ce8c81a010b1e57e0a7d31d5c8f7259b69a47;hb=cfd94f79c362da249d22a59b6ede367ce3d2ba1d;hpb=f3afa57e36550288340f1b6c694f354ae72654b9 diff --git a/eta.c b/eta.c index 075ce8c8..fdf55c5a 100644 --- a/eta.c +++ b/eta.c @@ -78,6 +78,7 @@ static void check_str_update(struct thread_data *td) c = 'C'; break; case TD_INITIALIZED: + case TD_SETTING_UP: c = 'I'; break; case TD_NOT_CREATED: @@ -139,13 +140,19 @@ static int thread_eta(struct thread_data *td) } /* - * if writing, bytes_total will be twice the size. If mixing, - * assume a 50/50 split and thus bytes_total will be 50% larger. + * if writing and verifying afterwards, bytes_total will be twice the + * size. In a mixed workload, verify phase will be the size of the + * first stage writes. */ if (td->o.do_verify && td->o.verify && td_write(td)) { - if (td_rw(td)) - bytes_total = bytes_total * 3 / 2; - else + if (td_rw(td)) { + unsigned int perc = 50; + + if (td->o.rwmix[DDIR_WRITE]) + perc = td->o.rwmix[DDIR_WRITE]; + + bytes_total += (bytes_total * perc) / 100; + } else bytes_total <<= 1; } @@ -318,7 +325,9 @@ int calc_thread_status(struct jobs_eta *je, int force) } else if (td->runstate == TD_RAMP) { je->nr_running++; je->nr_ramp++; - } else if (td->runstate < TD_RUNNING) + } else if (td->runstate == TD_SETTING_UP) + je->nr_running++; + else if (td->runstate < TD_RUNNING) je->nr_pending++; if (je->elapsed_sec >= 3)