From: Sree Harsha Totakura Date: Mon, 22 Oct 2012 11:51:58 +0000 (+0000) Subject: disable auto retry X-Git-Tag: initial-import-from-subversion-38251~11283 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7fa4f272efe39be2f8d29ac44e30f4a9f00a333d;p=oweals%2Fgnunet.git disable auto retry --- 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; static unsigned int num_cont_fails; /** - * Number of times we try overlay connect operations + * Continuous failures during overlay connect operations */ -static unsigned int retry_links; +static unsigned int cont_fails; /** - * Continuous failures during overlay connect operations + * Links which are successfully established */ -static unsigned int cont_fails; +static unsigned int established_links; + +/** + * Links which are not successfully established + */ +static unsigned int failed_links; /** * Global testing status @@ -335,6 +340,7 @@ peer_churn_cb (void *cls, const char *emsg) GNUNET_TESTBED_overlay_configure_topology (NULL, num_peers, peers, GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI, num_links, + GNUNET_TESTBED_TOPOLOGY_DISABLE_AUTO_RETRY, GNUNET_TESTBED_TOPOLOGY_OPTION_END); } } @@ -403,9 +409,8 @@ print_overlay_links_summary () { prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); printf ("\n%u links established in %.2f seconds\n", - num_links, ((double) prof_time.rel_value) / 1000.00); - printf ("Overlay link operations have been retried %u times upon timeouts\n", - retry_links); + established_links, ((double) prof_time.rel_value) / 1000.00); + printf ("%u links failed due to timeouts\n", failed_links); } @@ -497,7 +502,7 @@ controller_event_cb (void *cls, _("An operation has failed while linking\n")); printf ("F"); fflush (stdout); - retry_links++; + failed_links++; if (++cont_fails > num_cont_fails) { printf ("\nAborting due to very high failure rate"); @@ -509,15 +514,14 @@ controller_event_cb (void *cls, break; case GNUNET_TESTBED_ET_CONNECT: { - static unsigned int established_links; - if (0 != cont_fails) cont_fails--; if (0 == established_links) printf ("Establishing links. Please wait\n"); printf ("."); fflush (stdout); - if (++established_links == num_links) + established_links++; + if ((established_links + failed_links) == num_links) { print_overlay_links_summary (); result = GNUNET_OK;