gfio: graphing updates
[fio.git] / gfio.c
diff --git a/gfio.c b/gfio.c
index d0418a4585212939d7a5bee68b227dfceb0fe509..fc220f5da64923f40ec629e224e78562754d0bc6 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -187,70 +187,36 @@ static void gfio_update_thread_status(struct gui_entry *ge, char *status_message
 static void gfio_update_thread_status_all(char *status_message, double perc);
 void report_error(GError *error);
 
-static void iops_graph_y_axis_unit_change(struct graph *g, int power_of_ten)
-{
-       switch (power_of_ten) {
-               case 9: graph_y_title(g, "Billions of IOs / sec");
-                       break;
-               case 6: graph_y_title(g, "Millions of IOs / sec");
-                       break;
-               case 3: graph_y_title(g, "Thousands of IOs / sec");
-                       break;
-               case 0:
-               default: graph_y_title(g, "IOs / sec");
-                       break;
-       }
-}
-
 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_title(g, "IOPS (IOs/sec)");
        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);
-       graph_y_axis_unit_change_notify(g, iops_graph_y_axis_unit_change);
-       graph_add_extra_space(g, 0.005, 0.005, 0.03, 0.03);
+       graph_add_extra_space(g, 0.0, 0.0, 0.0, 0.0);
        return g;
 }
 
-static void bandwidth_graph_y_axis_unit_change(struct graph *g, int power_of_ten)
-{
-       switch (power_of_ten) {
-               case 9: graph_y_title(g, "Petabytes / sec");
-                       break;
-               case 6: graph_y_title(g, "Gigabytes / sec");
-                       break;
-               case 3: graph_y_title(g, "Megabytes / sec");
-                       break;
-               case 0:
-               default: graph_y_title(g, "Kilobytes / sec");
-                       break;
-       }
-}
-
 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_title(g, "Bandwidth (bytes/sec)");
        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);
+       graph_set_base_offset(g, 1);
        line_graph_set_data_count_limit(g, 100);
-       graph_y_axis_unit_change_notify(g, bandwidth_graph_y_axis_unit_change);
-       graph_add_extra_space(g, 0.005, 0.005, 0.03, 0.03);
-
+       graph_add_extra_space(g, 0.0, 0.0, 0.0, 0.0);
        return g;
 }