aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_ats.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-04-05 14:23:38 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-04-05 14:23:38 +0000
commit143df85a4543bad389083f959329a98023c78ee4 (patch)
tree672bf076e5668f7a5670d815430f6283a6517c15 /src/transport/test_transport_ats.c
parent9e442daca2554d6977f19de92f4833fa8179ec39 (diff)
downloadgnunet-143df85a4543bad389083f959329a98023c78ee4.tar.gz
gnunet-143df85a4543bad389083f959329a98023c78ee4.zip
Diffstat (limited to 'src/transport/test_transport_ats.c')
-rw-r--r--src/transport/test_transport_ats.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/transport/test_transport_ats.c b/src/transport/test_transport_ats.c
index ad806b908..41d3a9443 100644
--- a/src/transport/test_transport_ats.c
+++ b/src/transport/test_transport_ats.c
@@ -166,12 +166,11 @@ static void evaluate_measurements()
166 166
167 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"%savg,%f,stddev,%f\n",output,average,stddev); 167 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"%savg,%f,stddev,%f\n",output,average,stddev);
168 /* only log benchmark time for 10 peers */ 168 /* only log benchmark time for 10 peers */
169 169 if (results[MEASUREMENTS-1].peers == (10))
170 if (results[c].peers == (10)) 170 {
171 { 171 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Send data to gauger\n");
172 GAUGER ("TRANSPORT", "ATS execution time 10 peers", (int) average , "ms"); 172 GAUGER ("TRANSPORT", "ATS execution time 10 peers", (int) average , "ms");
173 } 173 }
174
175 shutdown_peers(); 174 shutdown_peers();
176} 175}
177 176
@@ -221,8 +220,10 @@ int stats_cb (void *cls,
221 if (results[r_index].timestamp != value) 220 if (results[r_index].timestamp != value)
222 { 221 {
223 r_index++; 222 r_index++;
223 fprintf(stderr, "(%i/%i)", r_index, MEASUREMENTS);
224 if (r_index >= MEASUREMENTS) 224 if (r_index >= MEASUREMENTS)
225 { 225 {
226 fprintf(stderr, "\n");
226 if (stats_task != GNUNET_SCHEDULER_NO_TASK) 227 if (stats_task != GNUNET_SCHEDULER_NO_TASK)
227 { 228 {
228 GNUNET_SCHEDULER_cancel(stats_task); 229 GNUNET_SCHEDULER_cancel(stats_task);
@@ -231,37 +232,35 @@ int stats_cb (void *cls,
231 evaluate_measurements(); 232 evaluate_measurements();
232 return GNUNET_NO; 233 return GNUNET_NO;
233 } 234 }
235 fprintf(stderr, "..");
236
234 results[r_index].timestamp = value; 237 results[r_index].timestamp = value;
235 } 238 }
236 239 //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS solution: %s %llu \n", r_index, name, value);
237 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
238 "[%i] ATS solution: %s %llu \n", r_index, name, value);
239 } 240 }
240 241
241 if (0 == strcmp (name,"ATS solution")) 242 if (0 == strcmp (name,"ATS solution"))
242 { 243 {
243 results[r_index].solution = value; 244 results[r_index].solution = value;
244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 245 //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS solution: %s %llu \n", r_index, name, value);
245 "[%i] ATS solution: %s %llu \n", r_index, name, value);
246 } 246 }
247 247
248 if (0 == strcmp (name,"ATS peers")) 248 if (0 == strcmp (name,"ATS peers"))
249 { 249 {
250 results[r_index].peers = value; 250 results[r_index].peers = value;
251 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 251 // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS peers: %s %llu \n", r_index, name, value);
252 "[%i] ATS peers: %s %llu \n", r_index, name, value);
253 } 252 }
254 253
255 if (0 == strcmp (name,"ATS mechanisms")) 254 if (0 == strcmp (name,"ATS mechanisms"))
256 { 255 {
257 results[r_index].mechs = value; 256 results[r_index].mechs = value;
258 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS mechanisms: %s %llu \n", r_index, name, value); 257 //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS mechanisms: %s %llu \n", r_index, name, value);
259 } 258 }
260 259
261 if (0 == strcmp (name,"ATS duration")) 260 if (0 == strcmp (name,"ATS duration"))
262 { 261 {
263 results[r_index].duration = value; 262 results[r_index].duration = value;
264 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS duration: %s %llu \n", r_index, name, value); 263 // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS duration: %s %llu \n", r_index, name, value);
265 } 264 }
266 } 265 }
267 return GNUNET_OK; 266 return GNUNET_OK;
@@ -387,7 +386,7 @@ run (void *cls,
387 ok = 1; 386 ok = 1;
388 measurement_started = GNUNET_NO; 387 measurement_started = GNUNET_NO;
389#if VERBOSE 388#if VERBOSE
390 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting %i peers.\n", NUM_PEERS); 389 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting %i peers.\n", peers);
391#endif 390#endif
392 peers_left = peers; 391 peers_left = peers;
393 pg = GNUNET_TESTING_daemons_start (cfg, 392 pg = GNUNET_TESTING_daemons_start (cfg,