diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-23 15:18:43 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-23 15:18:43 +0000 |
commit | d6a27b576d197ac823e8494f351d43a78125a35f (patch) | |
tree | f94d2bcd3d3432bb6f429547faa0506982f8b839 /src/testbed | |
parent | cc951a596e18468397b338d4d4adf1e03751c24a (diff) | |
download | gnunet-d6a27b576d197ac823e8494f351d43a78125a35f.tar.gz gnunet-d6a27b576d197ac823e8494f351d43a78125a35f.zip |
- print summary of established links
Diffstat (limited to 'src/testbed')
-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 f5b9b2566..e5282a5e0 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -141,6 +141,7 @@ print_overlay_links_summary () | |||
141 | if (GNUNET_YES == printed_already) | 141 | if (GNUNET_YES == printed_already) |
142 | return; | 142 | return; |
143 | printed_already = GNUNET_YES; | 143 | printed_already = GNUNET_YES; |
144 | printf ("%u links succeeded\n", established_links); | ||
144 | printf ("%u links failed due to timeouts\n", failed_links); | 145 | printf ("%u links failed due to timeouts\n", failed_links); |
145 | } | 146 | } |
146 | 147 | ||
@@ -166,7 +167,7 @@ controller_event_cb (void *cls, | |||
166 | failed_links++; | 167 | failed_links++; |
167 | if (++cont_fails > num_cont_fails) | 168 | if (++cont_fails > num_cont_fails) |
168 | { | 169 | { |
169 | printf ("\nAborting due to very high failure rate"); | 170 | printf ("\nAborting due to very high failure rate\n"); |
170 | print_overlay_links_summary (); | 171 | print_overlay_links_summary (); |
171 | GNUNET_SCHEDULER_cancel (abort_task); | 172 | GNUNET_SCHEDULER_cancel (abort_task); |
172 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); | 173 | abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL); |
@@ -203,7 +204,9 @@ static void test_run (void *cls, | |||
203 | struct GNUNET_TESTBED_Peer **peers) | 204 | struct GNUNET_TESTBED_Peer **peers) |
204 | { | 205 | { |
205 | result = GNUNET_OK; | 206 | result = GNUNET_OK; |
206 | fprintf (stdout, "\nTestbed running, waiting for keystroke to shut down\n"); | 207 | fprintf (stdout, "\n"); |
208 | print_overlay_links_summary (); | ||
209 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); | ||
207 | fflush (stdout); | 210 | fflush (stdout); |
208 | (void) getc (stdin); | 211 | (void) getc (stdin); |
209 | fprintf (stdout, "Shutting down. Please wait\n"); | 212 | fprintf (stdout, "Shutting down. Please wait\n"); |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index a03c23d15..24f17bc75 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) | |||
551 | 551 | ||
552 | if (NULL != rc->topology_operation) | 552 | if (NULL != rc->topology_operation) |
553 | { | 553 | { |
554 | GNUNET_TESTBED_operation_done (rc->topology_operation); | 554 | DEBUG ("Overlay topology generated in %s\n", prof_time (rc)); |
555 | GNUNET_TESTBED_operation_done (rc->topology_operation); | ||
555 | rc->topology_operation = NULL; | 556 | rc->topology_operation = NULL; |
556 | } | 557 | } |
557 | if (NULL != rc->test_master) | 558 | if (NULL != rc->test_master) |
@@ -722,7 +723,7 @@ call_cc: | |||
722 | DEBUG ("%u peers started in %s\n", rc->num_peers, | 723 | DEBUG ("%u peers started in %s\n", rc->num_peers, |
723 | prof_time (rc)); | 724 | prof_time (rc)); |
724 | if (GNUNET_TESTBED_TOPOLOGY_NONE != rc->topology) | 725 | if (GNUNET_TESTBED_TOPOLOGY_NONE != rc->topology) |
725 | { | 726 | { |
726 | if ( (GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI == rc->topology) | 727 | if ( (GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI == rc->topology) |
727 | || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD_RING == rc->topology) | 728 | || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD_RING == rc->topology) |
728 | || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD == rc->topology)) | 729 | || (GNUNET_TESTBED_TOPOLOGY_SMALL_WORLD == rc->topology)) |
@@ -760,7 +761,11 @@ call_cc: | |||
760 | LOG (GNUNET_ERROR_TYPE_WARNING, | 761 | LOG (GNUNET_ERROR_TYPE_WARNING, |
761 | "Not generating topology. Check number of peers\n"); | 762 | "Not generating topology. Check number of peers\n"); |
762 | else | 763 | else |
764 | { | ||
765 | DEBUG ("Creating overlay topology\n"); | ||
766 | rc->pstart_time = GNUNET_TIME_absolute_get (); | ||
763 | return; | 767 | return; |
768 | } | ||
764 | } | 769 | } |
765 | rc->state = RC_READY; | 770 | rc->state = RC_READY; |
766 | GNUNET_SCHEDULER_add_continuation (&call_master, rc, | 771 | GNUNET_SCHEDULER_add_continuation (&call_master, rc, |