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;
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);
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;
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);
+ graph_y_axis_unit_change_notify(g, bandwidth_graph_y_axis_unit_change);
return g;
}
static void preferences(GtkWidget *w, gpointer data)
{
GtkWidget *dialog, *frame, *box, **buttons, *vbox, *font;
- GtkWidget *hbox, *spin, *entry;
+ GtkWidget *hbox, *spin, *entry, *spin_int;
int i;
dialog = gtk_dialog_new_with_buttons("Preferences",
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
NULL);
- frame = gtk_frame_new("Debug logging");
+ frame = gtk_frame_new("Graphing");
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 5);
+ vbox = gtk_vbox_new(FALSE, 6);
+ gtk_container_add(GTK_CONTAINER(frame), vbox);
+
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
+ entry = gtk_label_new("Font face to use for graph labels");
+ gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 5);
+ font = gtk_font_button_new();
+ gtk_box_pack_start(GTK_BOX(hbox), font, FALSE, FALSE, 5);
+
+ box = gtk_vbox_new(FALSE, 6);
+ gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 5);
+
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 5);
+ entry = gtk_label_new("Maximum number of data points in graph (seconds)");
+ gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5);
+
+ spin = create_spinbutton(hbox, 10, 1000000, 100);
+
+ box = gtk_vbox_new(FALSE, 6);
+ gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 5);
+
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 5);
+ entry = gtk_label_new("Client ETA request interval (msec)");
+ gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5);
+
+ spin_int = create_spinbutton(hbox, 100, 100000, gfio_client_ops.eta_msec);
+ frame = gtk_frame_new("Debug logging");
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 5);
vbox = gtk_vbox_new(FALSE, 6);
gtk_container_add(GTK_CONTAINER(frame), vbox);
gtk_box_pack_start(GTK_BOX(box), buttons[i], FALSE, FALSE, 6);
}
- frame = gtk_frame_new("Graphing");
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), frame, FALSE, FALSE, 5);
- vbox = gtk_vbox_new(FALSE, 6);
- gtk_container_add(GTK_CONTAINER(frame), vbox);
-
- font = gtk_font_button_new();
- gtk_box_pack_start(GTK_BOX(vbox), font, FALSE, FALSE, 5);
-
- box = gtk_vbox_new(FALSE, 6);
- gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 5);
-
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
- entry = gtk_label_new("Maximum number of data points in graph (seconds)");
- gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5);
-
- spin = create_spinbutton(hbox, 10, 1000000, 100);
-
gtk_widget_show_all(dialog);
if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
gfio_graph_font = strdup(gtk_font_button_get_font_name(GTK_FONT_BUTTON(font)));
gfio_graph_limit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
update_graph_limits();
+ gfio_client_ops.eta_msec = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin_int));
gtk_widget_destroy(dialog);
}