aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_peergroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_peergroup.c')
-rw-r--r--src/testing/testing_peergroup.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index a76c7cc26..ba25a62bd 100644
--- a/src/testing/testing_peergroup.c
+++ b/src/testing/testing_peergroup.c
@@ -346,12 +346,12 @@ internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
346 /* Get duration in seconds */ 346 /* Get duration in seconds */
347 duration = 347 duration =
348 GNUNET_TIME_absolute_get_difference (connect_last_time, 348 GNUNET_TIME_absolute_get_difference (connect_last_time,
349 GNUNET_TIME_absolute_get ()). 349 GNUNET_TIME_absolute_get
350 rel_value / 1000; 350 ()).rel_value / 1000;
351 total_duration = 351 total_duration =
352 GNUNET_TIME_absolute_get_difference (connect_start_time, 352 GNUNET_TIME_absolute_get_difference (connect_start_time,
353 GNUNET_TIME_absolute_get ()). 353 GNUNET_TIME_absolute_get
354 rel_value / 1000; 354 ()).rel_value / 1000;
355 355
356 failed_conns_per_sec_recent = (double) new_failed_connections / duration; 356 failed_conns_per_sec_recent = (double) new_failed_connections / duration;
357 failed_conns_per_sec_total = (double) failed_connections / total_duration; 357 failed_conns_per_sec_total = (double) failed_connections / total_duration;
@@ -422,8 +422,8 @@ internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
422#if TIMING 422#if TIMING
423 total_duration = 423 total_duration =
424 GNUNET_TIME_absolute_get_difference (connect_start_time, 424 GNUNET_TIME_absolute_get_difference (connect_start_time,
425 GNUNET_TIME_absolute_get ()). 425 GNUNET_TIME_absolute_get
426 rel_value / 1000; 426 ()).rel_value / 1000;
427 failed_conns_per_sec_total = (double) failed_connections / total_duration; 427 failed_conns_per_sec_total = (double) failed_connections / total_duration;
428 conns_per_sec_total = (double) total_connections / total_duration; 428 conns_per_sec_total = (double) total_connections / total_duration;
429 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 429 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -493,10 +493,8 @@ internal_peers_started_callback (void *cls,
493 pg_start_ctx->expected_connections = 493 pg_start_ctx->expected_connections =
494 GNUNET_TESTING_connect_topology (pg_start_ctx->pg, 494 GNUNET_TESTING_connect_topology (pg_start_ctx->pg,
495 pg_start_ctx->connect_topology, 495 pg_start_ctx->connect_topology,
496 pg_start_ctx-> 496 pg_start_ctx->connect_topology_option,
497 connect_topology_option, 497 pg_start_ctx->connect_topology_option_modifier,
498 pg_start_ctx->
499 connect_topology_option_modifier,
500 DEFAULT_CONNECT_TIMEOUT, 498 DEFAULT_CONNECT_TIMEOUT,
501 pg_start_ctx->connect_attempts, NULL, 499 pg_start_ctx->connect_attempts, NULL,
502 NULL); 500 NULL);
@@ -736,8 +734,7 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
736 if (GNUNET_OK != 734 if (GNUNET_OK !=
737 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", 735 GNUNET_CONFIGURATION_get_value_number (cfg, "testing",
738 "max_outstanding_connections", 736 "max_outstanding_connections",
739 &pg_start_ctx-> 737 &pg_start_ctx->max_concurrent_connections))
740 max_concurrent_connections))
741 { 738 {
742 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", 739 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
743 "testing", "max_outstanding_connections"); 740 "testing", "max_outstanding_connections");
@@ -857,8 +854,8 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
857 "connect_topology_option", 854 "connect_topology_option",
858 &temp_str)) && 855 &temp_str)) &&
859 (GNUNET_NO == 856 (GNUNET_NO ==
860 GNUNET_TESTING_topology_option_get (&pg_start_ctx-> 857 GNUNET_TESTING_topology_option_get
861 connect_topology_option, temp_str))) 858 (&pg_start_ctx->connect_topology_option, temp_str)))
862 { 859 {
863 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 860 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
864 "Invalid connect topology option `%s' given for section %s option %s\n", 861 "Invalid connect topology option `%s' given for section %s option %s\n",
@@ -889,8 +886,7 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
889 if (GNUNET_YES != 886 if (GNUNET_YES !=
890 GNUNET_CONFIGURATION_get_value_string (cfg, "testing", 887 GNUNET_CONFIGURATION_get_value_string (cfg, "testing",
891 "blacklist_transports", 888 "blacklist_transports",
892 &pg_start_ctx-> 889 &pg_start_ctx->restrict_transports))
893 restrict_transports))
894 pg_start_ctx->restrict_transports = NULL; 890 pg_start_ctx->restrict_transports = NULL;
895 891
896 pg_start_ctx->restrict_topology = GNUNET_TESTING_TOPOLOGY_NONE; 892 pg_start_ctx->restrict_topology = GNUNET_TESTING_TOPOLOGY_NONE;