diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-02-17 14:03:43 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-02-17 14:03:43 +0000 |
commit | 1bb462f5dae340f2e989cb615fb60420b6ef0b41 (patch) | |
tree | aa17cacc617321cced48a004627002b7944d15ca /src/dht | |
parent | 0d95267569574f8381791e913e0ac6abf6d1e38b (diff) | |
download | gnunet-1bb462f5dae340f2e989cb615fb60420b6ef0b41.tar.gz gnunet-1bb462f5dae340f2e989cb615fb60420b6ef0b41.zip |
nicer logging
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/gnunet-dht-driver.c | 5 |
1 files 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, | |||
2651 | failed_conns_per_sec_total = (float)failed_connections / total_duration; | 2651 | failed_conns_per_sec_total = (float)failed_connections / total_duration; |
2652 | conns_per_sec_recent = (float)new_connections / duration; | 2652 | conns_per_sec_recent = (float)new_connections / duration; |
2653 | conns_per_sec_total = (float)total_connections / total_duration; | 2653 | conns_per_sec_total = (float)total_connections / total_duration; |
2654 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Recent: %f/s, Total: %f/s, Recent failed: %f/s, total failed %f/s\n", | 2654 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Recent: %.2f/s, Total: %.2f/s, Recent failed: %.2f/s, total failed %.2f/s\n", |
2655 | conns_per_sec_recent, CONN_UPDATE_DURATION, conns_per_sec_total, | 2655 | conns_per_sec_recent, CONN_UPDATE_DURATION, conns_per_sec_total, |
2656 | failed_conns_per_sec_recent, failed_conns_per_sec_total); | 2656 | failed_conns_per_sec_recent, failed_conns_per_sec_total); |
2657 | connect_last_time = GNUNET_TIME_absolute_get(); | 2657 | connect_last_time = GNUNET_TIME_absolute_get(); |
2658 | previous_connections = total_connections; | 2658 | previous_connections = total_connections; |
2659 | previous_failed_connections = failed_connections; | 2659 | previous_failed_connections = failed_connections; |
2660 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "have %u total_connections\n", total_connections); | 2660 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "have %u total_connections, %u failed\n", total_connections, failed_connections); |
2661 | #if ONLY_TESTING | 2661 | #if ONLY_TESTING |
2662 | /* These conditions likely mean we've entered the death spiral of doom */ | 2662 | /* These conditions likely mean we've entered the death spiral of doom */ |
2663 | if ((total_connections > 100000) && | 2663 | if ((total_connections > 100000) && |
@@ -2674,7 +2674,6 @@ topology_callback (void *cls, | |||
2674 | GNUNET_TESTING_stop_connections(pg); | 2674 | GNUNET_TESTING_stop_connections(pg); |
2675 | repeat_connect_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60), &repeat_connect, NULL); | 2675 | repeat_connect_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 60), &repeat_connect, NULL); |
2676 | } | 2676 | } |
2677 | |||
2678 | #endif | 2677 | #endif |
2679 | } | 2678 | } |
2680 | if (emsg == NULL) | 2679 | if (emsg == NULL) |