- /*
- * This puts some invisible data into a graph so that it will
- * initially have some grid lines instead of "No good data"
- */
- graph_add_label(g, "invisible");
- graph_set_color(g, "invisible", INVISIBLE_COLOR, 0.0, 0.7);
- graph_add_xy_data(g, "invisible", 0.0, 0.0);
- graph_add_xy_data(g, "invisible", 1.0, 100.0);
-}
-
-static void setup_iops_graph(struct gui *ui)
-{
- if (ui->iops_graph)
- graph_free(ui->iops_graph);
- ui->iops_graph = graph_new(DRAWING_AREA_XDIM / 2.0,
- DRAWING_AREA_YDIM, gfio_graph_font);
- graph_title(ui->iops_graph, "IOPS");
- graph_x_title(ui->iops_graph, "Time");
- graph_y_title(ui->iops_graph, "IOPS");
- graph_add_label(ui->iops_graph, "Read IOPS");
- graph_add_label(ui->iops_graph, "Write IOPS");
- graph_set_color(ui->iops_graph, "Read IOPS", 0.7, 0.0, 0.0);
- graph_set_color(ui->iops_graph, "Write IOPS", 0.0, 0.0, 0.7);
- add_invisible_data(ui->iops_graph);
-}
-
-static void setup_bandwidth_graph(struct gui *ui)
-{
- if (ui->bandwidth_graph)
- graph_free(ui->bandwidth_graph);
- ui->bandwidth_graph = graph_new(DRAWING_AREA_XDIM / 2.0,
- DRAWING_AREA_YDIM, gfio_graph_font);
- graph_title(ui->bandwidth_graph, "Bandwidth");
- graph_x_title(ui->bandwidth_graph, "Time");
- graph_y_title(ui->bandwidth_graph, "Bandwidth");
- graph_add_label(ui->bandwidth_graph, "Read Bandwidth");
- graph_add_label(ui->bandwidth_graph, "Write Bandwidth");
- graph_set_color(ui->bandwidth_graph, "Read Bandwidth", 0.7, 0.0, 0.0);
- graph_set_color(ui->bandwidth_graph, "Write Bandwidth", 0.0, 0.0, 0.7);
- add_invisible_data(ui->bandwidth_graph);
-}
-
-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 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;