Allow configurable ETA intervals
[fio.git] / client.c
index 2b136a0fc06950802dd0bf4ce7c2eb8f4d676005..18247ef6b9bd277c0e66a980b3a49679aa4f1173 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1834,6 +1834,9 @@ static void request_client_etas(struct client_ops *ops)
        struct client_eta *eta;
        int skipped = 0;
 
+       if (eta_print == FIO_ETA_NEVER)
+               return;
+
        dprint(FD_NET, "client: request eta (%d)\n", nr_clients);
 
        eta = calloc(1, sizeof(*eta) + __THREAD_RUNSTR_SZ(REAL_MAX_JOBS));
@@ -1997,7 +2000,7 @@ int fio_handle_clients(struct client_ops *ops)
                        int timeout;
 
                        fio_gettime(&ts, NULL);
-                       if (mtime_since(&eta_ts, &ts) >= 900) {
+                       if (eta_time_within_slack(mtime_since(&eta_ts, &ts))) {
                                request_client_etas(ops);
                                memcpy(&eta_ts, &ts, sizeof(ts));