forked from axboe/fio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lets squash them all, with a bit of tooling help. Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information
Showing
22 changed files
with
100 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* gfio - gui front end for fio - the flexible io tester | ||
* | ||
* Copyright (C) 2012 Stephen M. Cameron <[email protected]> | ||
* Copyright (C) 2012 Stephen M. Cameron <[email protected]> | ||
* Copyright (C) 2012 Jens Axboe <[email protected]> | ||
* | ||
* The license below covers all files distributed with fio unless otherwise | ||
|
@@ -406,11 +406,11 @@ static void ge_widget_destroy(GtkWidget *w, gpointer data) | |
|
||
static void gfio_quit(struct gui *ui) | ||
{ | ||
gtk_main_quit(); | ||
gtk_main_quit(); | ||
} | ||
|
||
static void quit_clicked(__attribute__((unused)) GtkWidget *widget, | ||
__attribute__((unused)) gpointer data) | ||
gpointer data) | ||
{ | ||
struct gui *ui = (struct gui *) data; | ||
|
||
|
@@ -471,7 +471,7 @@ static void gfio_start_server(struct gui *ui) | |
} | ||
|
||
static void start_job_clicked(__attribute__((unused)) GtkWidget *widget, | ||
gpointer data) | ||
gpointer data) | ||
{ | ||
struct gui_entry *ge = data; | ||
struct gfio_client *gc = ge->client; | ||
|
@@ -876,7 +876,7 @@ static int do_file_open_with_tab(struct gui *ui, const gchar *uri) | |
if (get_connection_details(ge)) { | ||
if (ge_is_new) | ||
gtk_widget_destroy(ge->vbox); | ||
|
||
return 1; | ||
} | ||
|
||
|
@@ -1016,7 +1016,7 @@ static void connect_job_entry(GtkWidget *w, gpointer data) | |
{ | ||
struct gui *ui = (struct gui *) data; | ||
struct gui_entry *ge; | ||
|
||
ge = get_ge_from_cur_tab(ui); | ||
if (ge) | ||
connect_clicked(w, ge); | ||
|
@@ -1420,7 +1420,7 @@ static GtkWidget *new_client_page(struct gui_entry *ge) | |
setup_graphs(&ge->graphs); | ||
|
||
/* | ||
* Set up alignments for widgets at the bottom of ui, | ||
* Set up alignments for widgets at the bottom of ui, | ||
* align bottom left, expand horizontally but not vertically | ||
*/ | ||
bottom_align = gtk_alignment_new(0, 1, 1, 0); | ||
|
@@ -1507,7 +1507,7 @@ static GtkWidget *new_main_page(struct gui *ui) | |
setup_graphs(&ui->graphs); | ||
|
||
/* | ||
* Set up alignments for widgets at the bottom of ui, | ||
* Set up alignments for widgets at the bottom of ui, | ||
* align bottom left, expand horizontally but not vertically | ||
*/ | ||
bottom_align = gtk_alignment_new(0, 1, 1, 0); | ||
|
@@ -1670,7 +1670,7 @@ static void init_ui(int *argc, char **argv[], struct gui *ui) | |
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting"); | ||
g_type_init(); | ||
gdk_color_parse("white", &gfio_color_white); | ||
|
||
ui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | ||
gtk_window_set_title(GTK_WINDOW(ui->window), "fio"); | ||
gtk_window_set_default_size(GTK_WINDOW(ui->window), 1024, 768); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* gfio - gui front end for fio - the flexible io tester | ||
* | ||
* Copyright (C) 2012 Stephen M. Cameron <[email protected]> | ||
* Copyright (C) 2012 Stephen M. Cameron <[email protected]> | ||
* | ||
* The license below covers all files distributed with fio unless otherwise | ||
* noted in the file itself. | ||
|
@@ -87,10 +87,10 @@ struct graph { | |
graph_axis_unit_change_callback y_axis_unit_change_callback; | ||
unsigned int base_offset; | ||
unsigned int dont_graph_all_zeroes; | ||
double left_extra; | ||
double right_extra; | ||
double top_extra; | ||
double bottom_extra; | ||
double left_extra; | ||
double right_extra; | ||
double top_extra; | ||
double bottom_extra; | ||
|
||
double xtick_zero; | ||
double xtick_delta; | ||
|
@@ -263,19 +263,19 @@ static void draw_bars(struct graph *bg, cairo_t *cr, struct graph_label *lb, | |
cairo_close_path(cr); | ||
cairo_fill(cr); | ||
cairo_stroke(cr); | ||
bar_num++; | ||
bar_num++; | ||
} | ||
} | ||
|
||
static void graph_draw_common(struct graph *g, cairo_t *cr, | ||
double *x1, double *y1, double *x2, double *y2) | ||
{ | ||
cairo_set_source_rgb(cr, 0, 0, 0); | ||
cairo_set_line_width (cr, 0.8); | ||
cairo_set_line_width(cr, 0.8); | ||
|
||
*x1 = 0.10 * g->xdim; | ||
*x1 = 0.10 * g->xdim; | ||
*x2 = 0.95 * g->xdim; | ||
*y1 = 0.10 * g->ydim; | ||
*y1 = 0.10 * g->ydim; | ||
*y2 = 0.90 * g->ydim; | ||
|
||
cairo_move_to(cr, *x1, *y1); | ||
|
@@ -459,7 +459,7 @@ void bar_graph_draw(struct graph *bg, cairo_t *cr) | |
draw_bars(bg, cr, lb, label_offset, bar_width, mindata, maxdata); | ||
// draw_centered_text(cr, label_offset + (bar_width / 2.0 + bar_width * 0.1), bg->ydim * 0.93, | ||
draw_centered_text(cr, bg->font, x1 + space_per_label * (i + 0.5), bg->ydim * 0.93, | ||
12.0, lb->label); | ||
12.0, lb->label); | ||
i++; | ||
} | ||
cairo_stroke(cr); | ||
|
@@ -498,7 +498,7 @@ static double find_xy_value(struct graph *g, xy_value_extractor getvalue, double | |
first = 0; | ||
answer = tmp; | ||
} | ||
answer = cmp(tmp, answer); | ||
answer = cmp(tmp, answer); | ||
} | ||
} | ||
|
||
|
@@ -618,7 +618,7 @@ static struct graph_label *graph_find_label(struct graph *bg, | |
{ | ||
struct flist_head *entry; | ||
struct graph_label *i; | ||
|
||
flist_for_each(entry, &bg->label_list) { | ||
i = flist_entry(entry, struct graph_label, list); | ||
|
||
|
@@ -632,7 +632,7 @@ static struct graph_label *graph_find_label(struct graph *bg, | |
graph_label_t graph_add_label(struct graph *bg, const char *label) | ||
{ | ||
struct graph_label *i; | ||
|
||
i = graph_find_label(bg, label); | ||
if (i) | ||
return i; /* already present. */ | ||
|
@@ -818,7 +818,7 @@ static void graph_free_values(struct graph_label *l) | |
while (!flist_empty(&l->value_list)) { | ||
i = flist_entry(l->value_list.next, struct graph_value, list); | ||
graph_value_drop(l, i); | ||
} | ||
} | ||
} | ||
|
||
static void graph_free_labels(struct graph *g) | ||
|
@@ -830,7 +830,7 @@ static void graph_free_labels(struct graph *g) | |
flist_del(&i->list); | ||
graph_free_values(i); | ||
free(i); | ||
} | ||
} | ||
} | ||
|
||
void graph_set_color(struct graph *gr, graph_label_t label, double red, | ||
|
@@ -878,13 +878,14 @@ void line_graph_set_data_count_limit(struct graph *g, int per_label_limit) | |
g->per_label_limit = per_label_limit; | ||
} | ||
|
||
void graph_add_extra_space(struct graph *g, double left_percent, double right_percent, | ||
double top_percent, double bottom_percent) | ||
void graph_add_extra_space(struct graph *g, double left_percent, | ||
double right_percent, double top_percent, | ||
double bottom_percent) | ||
{ | ||
g->left_extra = left_percent; | ||
g->right_extra = right_percent; | ||
g->top_extra = top_percent; | ||
g->bottom_extra = bottom_percent; | ||
g->left_extra = left_percent; | ||
g->right_extra = right_percent; | ||
g->top_extra = top_percent; | ||
g->bottom_extra = bottom_percent; | ||
} | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.