From 1bb462f5dae340f2e989cb615fb60420b6ef0b41 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 17 Feb 2011 14:03:43 +0000 Subject: [PATCH] nicer logging --- src/dht/gnunet-dht-driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c index 07cbf7981..dd710a21e 100644 --- a/src/dht/gnunet-dht-driver.c +++ b/src/dht/gnunet-dht-driver.c @@ -2651,13 +2651,13 @@ topology_callback (void *cls, failed_conns_per_sec_total = (float)failed_connections / total_duration; conns_per_sec_recent = (float)new_connections / duration; conns_per_sec_total = (float)total_connections / total_duration; - GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Recent: %f/s, Total: %f/s, Recent failed: %f/s, total failed %f/s\n", + GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Recent: %.2f/s, Total: %.2f/s, Recent failed: %.2f/s, total failed %.2f/s\n", conns_per_sec_recent, CONN_UPDATE_DURATION, conns_per_sec_total, failed_conns_per_sec_recent, failed_conns_per_sec_total); connect_last_time = GNUNET_TIME_absolute_get(); previous_connections = total_connections; previous_failed_connections = failed_connections; - GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "have %u total_connections\n", total_connections); + GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "have %u total_connections, %u failed\n", total_connections, failed_connections); #if ONLY_TESTING /* These conditions likely mean we've entered the death spiral of doom */ if ((total_connections > 100000) && @@ -2674,7 +2674,6 @@ topology_callback (void *cls, GNUNET_TESTING_stop_connections(pg); repeat_connect_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60), &repeat_connect, NULL); } - #endif } if (emsg == NULL) -- 2.25.1