aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/gnunet-statistics-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/gnunet-statistics-gtk.c')
-rw-r--r--src/statistics/gnunet-statistics-gtk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/statistics/gnunet-statistics-gtk.c b/src/statistics/gnunet-statistics-gtk.c
index 558e7baa..54feb943 100644
--- a/src/statistics/gnunet-statistics-gtk.c
+++ b/src/statistics/gnunet-statistics-gtk.c
@@ -136,11 +136,14 @@ process_value_update (void *cls, const char *subsystem,
136 int is_persistent) 136 int is_persistent)
137{ 137{
138 GtkStatistics *stats = cls; 138 GtkStatistics *stats = cls;
139 char *id;
139 140
141 GNUNET_asprintf (&id, "%s: %s", subsystem, name);
140 gtk_statistics_update_value (stats, 142 gtk_statistics_update_value (stats,
141 name, 143 id,
142 GNUNET_TIME_absolute_get_duration (start_time).rel_value / 1000LL, 144 GNUNET_TIME_absolute_get_duration (start_time).rel_value / 1000LL,
143 value); 145 value);
146 GNUNET_free (id);
144 return GNUNET_OK; 147 return GNUNET_OK;
145} 148}
146 149
@@ -171,16 +174,19 @@ create_plot (const char *box_name,
171 GtkBox *box; 174 GtkBox *box;
172 GtkStatistics *ret; 175 GtkStatistics *ret;
173 unsigned int i; 176 unsigned int i;
177 char *id;
174 178
175 ret = GTK_STATISTICS (gtk_statistics_new ()); 179 ret = GTK_STATISTICS (gtk_statistics_new ());
176 box = GTK_BOX (get_object (box_name)); 180 box = GTK_BOX (get_object (box_name));
177 181
178 for (i=0; NULL != info[i].subsystem; i++) 182 for (i=0; NULL != info[i].subsystem; i++)
179 { 183 {
184 GNUNET_asprintf (&id, "%s: %s", info[i].subsystem, info[i].name);
180 gtk_statistics_add_line (ret, 185 gtk_statistics_add_line (ret,
181 info[i].name, 186 id,
182 info[i].label, 187 info[i].label,
183 info[i].color_name); 188 info[i].color_name);
189 GNUNET_free (id);
184 GNUNET_STATISTICS_watch (statistics, 190 GNUNET_STATISTICS_watch (statistics,
185 info[i].subsystem, 191 info[i].subsystem,
186 info[i].name, 192 info[i].name,