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/gnunet-testbed-profiler.c | |
parent | cc951a596e18468397b338d4d4adf1e03751c24a (diff) | |
download | gnunet-d6a27b576d197ac823e8494f351d43a78125a35f.tar.gz gnunet-d6a27b576d197ac823e8494f351d43a78125a35f.zip |
- print summary of established links
Diffstat (limited to 'src/testbed/gnunet-testbed-profiler.c')
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 7 |
1 files changed, 5 insertions, 2 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"); |