Unify cli latency display
[fio.git] / gfio.c
diff --git a/gfio.c b/gfio.c
index 32e012e7ba360535157a97f856fe5ec7b0117249..ebfa4b9de7dcd752926baaf00d66836d60caa334 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -154,16 +154,18 @@ static void gfio_disk_util_op(struct fio_client *client, struct fio_net_cmd *cmd
        fio_client_ops.disk_util(client, cmd);
 }
 
-static void gfio_thread_status_op(struct fio_net_cmd *cmd)
+static void gfio_thread_status_op(struct fio_client *client,
+                                 struct fio_net_cmd *cmd)
 {
        printf("gfio_thread_status_op called\n");
-       fio_client_ops.thread_status(cmd);
+       fio_client_ops.thread_status(client, cmd);
 }
 
-static void gfio_group_stats_op(struct fio_net_cmd *cmd)
+static void gfio_group_stats_op(struct fio_client *client,
+                               struct fio_net_cmd *cmd)
 {
        printf("gfio_group_stats_op called\n");
-       fio_client_ops.group_stats(cmd);
+       fio_client_ops.group_stats(client, cmd);
 }
 
 static void gfio_update_eta(struct jobs_eta *je)
@@ -246,19 +248,6 @@ static void gfio_update_eta(struct jobs_eta *je)
        gfio_update_thread_status(output, perc);
 }
 
-static void gfio_eta_op(struct fio_client *client, struct fio_net_cmd *cmd)
-{
-       struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
-       struct client_eta *eta = (struct client_eta *) (uintptr_t) cmd->tag;
-
-       client->eta_in_flight = NULL;
-       flist_del_init(&client->eta_list);
-
-       fio_client_convert_jobs_eta(je);
-       fio_client_sum_jobs_eta(&eta->eta, je);
-       fio_client_dec_jobs_eta(eta, gfio_update_eta);
-}
-
 static void gfio_probe_op(struct fio_client *client, struct fio_net_cmd *cmd)
 {
        struct cmd_probe_pdu *probe = (struct cmd_probe_pdu *) cmd->payload;
@@ -366,7 +355,7 @@ struct client_ops gfio_client_ops = {
        .disk_util              = gfio_disk_util_op,
        .thread_status          = gfio_thread_status_op,
        .group_stats            = gfio_group_stats_op,
-       .eta                    = gfio_eta_op,
+       .eta                    = gfio_update_eta,
        .probe                  = gfio_probe_op,
        .quit                   = gfio_quit_op,
        .add_job                = gfio_add_job_op,
@@ -656,7 +645,7 @@ static void file_open(GtkWidget *w, gpointer data)
                ui.job_files[ui.nr_job_files] = strdup(filenames->data);
                ui.nr_job_files++;
 
-               ui.client = fio_client_add_explicit(host, type, port);
+               ui.client = fio_client_add_explicit(&gfio_client_ops, host, type, port);
                if (!ui.client) {
                        GError *error;