diff options
author | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-23 15:18:43 +0000 |
---|---|---|
committer | harsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-23 15:18:43 +0000 |
commit | 2518d8573dd7ea023eb204b9337cf5d43e997aaf (patch) | |
tree | f94d2bcd3d3432bb6f429547faa0506982f8b839 | |
parent | f010e6655def3cc09580fdfaff4efa8cf9a8ace3 (diff) |
- print summary of established links
git-svn-id: https://gnunet.org/svn/gnunet@25865 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 7 | ||||
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index f5b9b25667..e5282a5e0a 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c @@ -141,6 +141,7 @@ print_overlay_links_summary () if (GNUNET_YES == printed_already) return; printed_already = GNUNET_YES; + printf ("%u links succeeded\n", established_links); printf ("%u links failed due to timeouts\n", failed_links); } @@ -166,7 +167,7 @@ controller_event_cb (void *cls, failed_links++; if (++cont_fails > num_cont_fails) { - printf ("\nAborting due to very high failure rate"); + printf ("\nAborting due to very high failure rate\n"); print_overlay_links_summary (); GNUNET_SCHEDULER_cancel (abort_task); abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); @@ -203,7 +204,9 @@ static void test_run (void *cls, struct GNUNET_TESTBED_Peer **peers) { result = GNUNET_OK; - fprintf (stdout, "\nTestbed running, waiting for keystroke to shut down\n"); + fprintf (stdout, "\n"); + print_overlay_links_summary (); + fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); fflush (stdout); (void) getc (stdin); fprintf (stdout, "Shutting down. Please wait\n"); diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index a03c23d15f..24f17bc75b 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c @@ -551,7 +551,8 @@ call_master (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (NULL != rc->topology_operation) { - GNUNET_TESTBED_operation_done (rc->topology_operation); + DEBUG ("Overlay topology generated in %s\n", prof_time (rc)); + GNUNET_TESTBED_operation_done (rc->topology_operation); rc->topology_operation = NULL; } if (NULL != rc->test_master) @@ -722,7 +723,7 @@ call_cc: DEBUG ("%u peers started in %s\n", rc->num_peers, prof_time (rc)); if (GNUNET_TESTBED_TOPOLOGY_NONE != rc->topology) - { + { if ( (GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI == rc->topology) || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD_RING == rc->topology) || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD == rc->topology)) @@ -760,7 +761,11 @@ call_cc: LOG (GNUNET_ERROR_TYPE_WARNING, "Not generating topology. Check number of peers\n"); else + { + DEBUG ("Creating overlay topology\n"); + rc->pstart_time = GNUNET_TIME_absolute_get (); return; + } } rc->state = RC_READY; GNUNET_SCHEDULER_add_continuation (&call_master, rc, |