aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testbed/gnunet-testbed-profiler.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c
index b01e992b9..c4611da53 100644
--- a/src/testbed/gnunet-testbed-profiler.c
+++ b/src/testbed/gnunet-testbed-profiler.c
@@ -207,14 +207,19 @@ static unsigned int num_links;
207static unsigned int num_cont_fails; 207static unsigned int num_cont_fails;
208 208
209/** 209/**
210 * Number of times we try overlay connect operations 210 * Continuous failures during overlay connect operations
211 */ 211 */
212static unsigned int retry_links; 212static unsigned int cont_fails;
213 213
214/** 214/**
215 * Continuous failures during overlay connect operations 215 * Links which are successfully established
216 */ 216 */
217static unsigned int cont_fails; 217static unsigned int established_links;
218
219/**
220 * Links which are not successfully established
221 */
222static unsigned int failed_links;
218 223
219/** 224/**
220 * Global testing status 225 * Global testing status
@@ -335,6 +340,7 @@ peer_churn_cb (void *cls, const char *emsg)
335 GNUNET_TESTBED_overlay_configure_topology (NULL, num_peers, peers, 340 GNUNET_TESTBED_overlay_configure_topology (NULL, num_peers, peers,
336 GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI, 341 GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI,
337 num_links, 342 num_links,
343 GNUNET_TESTBED_TOPOLOGY_DISABLE_AUTO_RETRY,
338 GNUNET_TESTBED_TOPOLOGY_OPTION_END); 344 GNUNET_TESTBED_TOPOLOGY_OPTION_END);
339 } 345 }
340} 346}
@@ -403,9 +409,8 @@ print_overlay_links_summary ()
403{ 409{
404 prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); 410 prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time);
405 printf ("\n%u links established in %.2f seconds\n", 411 printf ("\n%u links established in %.2f seconds\n",
406 num_links, ((double) prof_time.rel_value) / 1000.00); 412 established_links, ((double) prof_time.rel_value) / 1000.00);
407 printf ("Overlay link operations have been retried %u times upon timeouts\n", 413 printf ("%u links failed due to timeouts\n", failed_links);
408 retry_links);
409} 414}
410 415
411 416
@@ -497,7 +502,7 @@ controller_event_cb (void *cls,
497 _("An operation has failed while linking\n")); 502 _("An operation has failed while linking\n"));
498 printf ("F"); 503 printf ("F");
499 fflush (stdout); 504 fflush (stdout);
500 retry_links++; 505 failed_links++;
501 if (++cont_fails > num_cont_fails) 506 if (++cont_fails > num_cont_fails)
502 { 507 {
503 printf ("\nAborting due to very high failure rate"); 508 printf ("\nAborting due to very high failure rate");
@@ -509,15 +514,14 @@ controller_event_cb (void *cls,
509 break; 514 break;
510 case GNUNET_TESTBED_ET_CONNECT: 515 case GNUNET_TESTBED_ET_CONNECT:
511 { 516 {
512 static unsigned int established_links;
513
514 if (0 != cont_fails) 517 if (0 != cont_fails)
515 cont_fails--; 518 cont_fails--;
516 if (0 == established_links) 519 if (0 == established_links)
517 printf ("Establishing links. Please wait\n"); 520 printf ("Establishing links. Please wait\n");
518 printf ("."); 521 printf (".");
519 fflush (stdout); 522 fflush (stdout);
520 if (++established_links == num_links) 523 established_links++;
524 if ((established_links + failed_links) == num_links)
521 { 525 {
522 print_overlay_links_summary (); 526 print_overlay_links_summary ();
523 result = GNUNET_OK; 527 result = GNUNET_OK;