From 143df85a4543bad389083f959329a98023c78ee4 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 5 Apr 2011 14:23:38 +0000 Subject: --- src/transport/test_transport_ats.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/transport/test_transport_ats.c') 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() GNUNET_log (GNUNET_ERROR_TYPE_ERROR,"%savg,%f,stddev,%f\n",output,average,stddev); /* only log benchmark time for 10 peers */ - - if (results[c].peers == (10)) - { - GAUGER ("TRANSPORT", "ATS execution time 10 peers", (int) average , "ms"); - } - + if (results[MEASUREMENTS-1].peers == (10)) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Send data to gauger\n"); + GAUGER ("TRANSPORT", "ATS execution time 10 peers", (int) average , "ms"); + } shutdown_peers(); } @@ -221,8 +220,10 @@ int stats_cb (void *cls, if (results[r_index].timestamp != value) { r_index++; + fprintf(stderr, "(%i/%i)", r_index, MEASUREMENTS); if (r_index >= MEASUREMENTS) { + fprintf(stderr, "\n"); if (stats_task != GNUNET_SCHEDULER_NO_TASK) { GNUNET_SCHEDULER_cancel(stats_task); @@ -231,37 +232,35 @@ int stats_cb (void *cls, evaluate_measurements(); return GNUNET_NO; } + fprintf(stderr, ".."); + results[r_index].timestamp = value; } - - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "[%i] ATS solution: %s %llu \n", r_index, name, value); + //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS solution: %s %llu \n", r_index, name, value); } if (0 == strcmp (name,"ATS solution")) { results[r_index].solution = value; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "[%i] ATS solution: %s %llu \n", r_index, name, value); + //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS solution: %s %llu \n", r_index, name, value); } if (0 == strcmp (name,"ATS peers")) { results[r_index].peers = value; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "[%i] ATS peers: %s %llu \n", r_index, name, value); + // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS peers: %s %llu \n", r_index, name, value); } if (0 == strcmp (name,"ATS mechanisms")) { results[r_index].mechs = value; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS mechanisms: %s %llu \n", r_index, name, value); + //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS mechanisms: %s %llu \n", r_index, name, value); } if (0 == strcmp (name,"ATS duration")) { results[r_index].duration = value; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS duration: %s %llu \n", r_index, name, value); + // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "[%i] ATS duration: %s %llu \n", r_index, name, value); } } return GNUNET_OK; @@ -387,7 +386,7 @@ run (void *cls, ok = 1; measurement_started = GNUNET_NO; #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting %i peers.\n", NUM_PEERS); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting %i peers.\n", peers); #endif peers_left = peers; pg = GNUNET_TESTING_daemons_start (cfg, -- cgit v1.2.3