-} ui;
-
-static void clear_ui_info(struct gui *ui)
-{
- gtk_label_set_text(GTK_LABEL(ui->probe.hostname), "");
- gtk_label_set_text(GTK_LABEL(ui->probe.os), "");
- gtk_label_set_text(GTK_LABEL(ui->probe.arch), "");
- gtk_label_set_text(GTK_LABEL(ui->probe.fio_ver), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.name), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.iotype), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.ioengine), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.iodepth), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.jobs), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.files), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.read_bw), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.read_iops), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.write_bw), "");
- gtk_entry_set_text(GTK_ENTRY(ui->eta.write_iops), "");
+};
+
+struct gfio_client {
+ struct gui_entry *ge;
+ struct fio_client *client;
+ GtkWidget *results_widget;
+ GtkWidget *disk_util_frame;
+ GtkWidget *err_entry;
+ unsigned int job_added;
+ struct thread_options o;
+};
+
+static void gfio_update_thread_status(struct gui_entry *ge, char *status_message, double perc);
+static void gfio_update_thread_status_all(char *status_message, double perc);
+void report_error(GError *error);
+
+static struct graph *setup_iops_graph(void)
+{
+ struct graph *g;
+
+ g = graph_new(DRAWING_AREA_XDIM / 2.0, DRAWING_AREA_YDIM, gfio_graph_font);
+ graph_title(g, "IOPS");
+ graph_x_title(g, "Time (secs)");
+ graph_y_title(g, "IOs / sec");
+ graph_add_label(g, "Read IOPS");
+ graph_add_label(g, "Write IOPS");
+ graph_set_color(g, "Read IOPS", 0.13, 0.54, 0.13);
+ graph_set_color(g, "Write IOPS", 1.0, 0.0, 0.0);
+ line_graph_set_data_count_limit(g, gfio_graph_limit);
+ return g;
+}
+
+static struct graph *setup_bandwidth_graph(void)
+{
+ struct graph *g;
+
+ g = graph_new(DRAWING_AREA_XDIM / 2.0, DRAWING_AREA_YDIM, gfio_graph_font);
+ graph_title(g, "Bandwidth");
+ graph_x_title(g, "Time (secs)");
+ graph_y_title(g, "Kbytes / sec");
+ graph_add_label(g, "Read Bandwidth");
+ graph_add_label(g, "Write Bandwidth");
+ graph_set_color(g, "Read Bandwidth", 0.13, 0.54, 0.13);
+ graph_set_color(g, "Write Bandwidth", 1.0, 0.0, 0.0);
+ line_graph_set_data_count_limit(g, 100);
+ return g;
+}
+
+static void setup_graphs(struct gfio_graphs *g)
+{
+ g->iops_graph = setup_iops_graph();
+ g->bandwidth_graph = setup_bandwidth_graph();
+}
+
+static void clear_ge_ui_info(struct gui_entry *ge)
+{
+ gtk_label_set_text(GTK_LABEL(ge->probe.hostname), "");
+ gtk_label_set_text(GTK_LABEL(ge->probe.os), "");
+ gtk_label_set_text(GTK_LABEL(ge->probe.arch), "");
+ gtk_label_set_text(GTK_LABEL(ge->probe.fio_ver), "");
+#if 0
+ /* should we empty it... */
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.name), "");
+#endif
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.iotype), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.ioengine), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.iodepth), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.jobs), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.files), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.read_bw), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.read_iops), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.write_bw), "");
+ gtk_entry_set_text(GTK_ENTRY(ge->eta.write_iops), "");
+}
+
+static GtkWidget *new_combo_entry_in_frame(GtkWidget *box, const char *label)
+{
+ GtkWidget *entry, *frame;
+
+ frame = gtk_frame_new(label);
+ entry = gtk_combo_box_new_text();
+ gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 3);
+ gtk_container_add(GTK_CONTAINER(frame), entry);
+
+ return entry;