Recent changes (gfio)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit de26d51f3e909997c9a500bf9f15a1bd5c18bb49:

  Merge branch 'master' into gfio (2012-09-25 19:51:04 +0200)

are available in the git repository at:

  git://git.kernel.dk/fio.git gfio

Jens Axboe (1):
      gfio: clear graphs for repeated runs on same connection

 gfio.c  |    7 +++++++
 graph.c |   11 +++++++++++
 graph.h |    2 ++
 3 files changed, 20 insertions(+), 0 deletions(-)

---

Diff of recent changes:

diff --git a/gfio.c b/gfio.c
index 3138941..185dbd5 100644
--- a/gfio.c
+++ b/gfio.c
@@ -654,6 +654,12 @@ static void gfio_client_added(struct gui_entry *ge, struct fio_client *client)
 	gc->o_list_nr++;
 }
 
+static void gfio_clear_graph_data(struct gfio_graphs *g)
+{
+	graph_clear_values(g->iops_graph);
+	graph_clear_values(g->bandwidth_graph);
+}
+
 static void connect_clicked(GtkWidget *widget, gpointer data)
 {
 	struct gui_entry *ge = data;
@@ -694,6 +700,7 @@ static void connect_clicked(GtkWidget *widget, gpointer data)
 			if (!ge->ui->handler_running)
 				pthread_create(&ge->ui->t, NULL, job_thread, ge->ui);
 			gfio_set_state(ge, GE_STATE_CONNECTED);
+			gfio_clear_graph_data(&ge->graphs);
 		} else {
 			gfio_report_error(ge, "Failed to connect to %s: %s\n", ge->client->client->hostname, strerror(-ret));
 		}
diff --git a/graph.c b/graph.c
index 7a35736..7a7c792 100644
--- a/graph.c
+++ b/graph.c
@@ -853,6 +853,17 @@ static void graph_free_labels(struct graph *g)
 	}
 }
 
+void graph_clear_values(struct graph *g)
+{
+	struct flist_head *node;
+	struct graph_label *i;
+
+	flist_for_each(node, &g->label_list) {
+		i = flist_entry(node, struct graph_label, list);
+		graph_free_values(i);
+	}
+}
+
 void graph_set_color(struct graph *gr, graph_label_t label, double red,
 		     double green, double blue)
 {
diff --git a/graph.h b/graph.h
index 42f781f..078e50c 100644
--- a/graph.h
+++ b/graph.h
@@ -93,5 +93,7 @@ extern int graph_contains_xy(struct graph *p, int x, int y);
 extern void graph_set_base_offset(struct graph *g, unsigned int base_offset);
 extern void graph_set_graph_all_zeroes(struct graph *g, unsigned int set);
 
+extern void graph_clear_values(struct graph *g);
+
 #endif
 
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux