aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet_dht_profiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet_dht_profiler.c')
-rw-r--r--src/dht/gnunet_dht_profiler.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c
index 12c273492..31671545d 100644
--- a/src/dht/gnunet_dht_profiler.c
+++ b/src/dht/gnunet_dht_profiler.c
@@ -276,12 +276,12 @@ static uint64_t incoming_bandwidth;
276/** 276/**
277 * Average number of hops taken to do put. 277 * Average number of hops taken to do put.
278 */ 278 */
279static unsigned int average_put_path_length; 279static double average_put_path_length;
280 280
281/** 281/**
282 * Average number of hops taken to do get. 282 * Average number of hops taken to do get.
283 */ 283 */
284static unsigned int average_get_path_length; 284static double average_get_path_length;
285 285
286/** 286/**
287 * Total put path length across all peers. 287 * Total put path length across all peers.
@@ -454,8 +454,8 @@ summarize ()
454 INFO ("# GETS made: %u\n", n_gets); 454 INFO ("# GETS made: %u\n", n_gets);
455 INFO ("# GETS succeeded: %u\n", n_gets_ok); 455 INFO ("# GETS succeeded: %u\n", n_gets_ok);
456 INFO ("# GETS failed: %u\n", n_gets_fail); 456 INFO ("# GETS failed: %u\n", n_gets_fail);
457 INFO ("# average_put_path_length: %u\n", average_put_path_length); 457 INFO ("# average_put_path_length: %f\n", average_put_path_length);
458 INFO ("# average_get_path_length: %u\n", average_get_path_length); 458 INFO ("# average_get_path_length: %f\n", average_get_path_length);
459 459
460 if (NULL == testbed_handles) 460 if (NULL == testbed_handles)
461 { 461 {
@@ -542,8 +542,8 @@ get_iter (void *cls,
542 /* Summarize if profiling is complete */ 542 /* Summarize if profiling is complete */
543 if (n_active == n_gets_fail + n_gets_ok) 543 if (n_active == n_gets_fail + n_gets_ok)
544 { 544 {
545 average_put_path_length = total_put_path_length/n_active; 545 average_put_path_length = (double)total_put_path_length/(double)n_active;
546 average_get_path_length = total_get_path_length/n_active; 546 average_get_path_length = (double)total_get_path_length/(double)n_active;
547 summarize (); 547 summarize ();
548 } 548 }
549} 549}