diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:27 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-03-17 11:02:27 +0000 |
commit | ea84f388bbc47b95f7689698c4fe848b6db8d04b (patch) | |
tree | fb024e7ae82db601c776fa0ae8c0f3f1aaed75e7 /src | |
parent | 68c9ae2ae6298cdd2fa555c440deb137c7fc822c (diff) | |
download | gnunet-ea84f388bbc47b95f7689698c4fe848b6db8d04b.tar.gz gnunet-ea84f388bbc47b95f7689698c4fe848b6db8d04b.zip |
- log, debug
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-mesh-profiler.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mesh/gnunet-mesh-profiler.c b/src/mesh/gnunet-mesh-profiler.c index 234d4f0e2..c0c7b8c93 100644 --- a/src/mesh/gnunet-mesh-profiler.c +++ b/src/mesh/gnunet-mesh-profiler.c | |||
@@ -379,6 +379,7 @@ adjust_running_peers (unsigned int target) | |||
379 | 379 | ||
380 | GNUNET_assert (target <= TOTAL_PEERS); | 380 | GNUNET_assert (target <= TOTAL_PEERS); |
381 | 381 | ||
382 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "adjust peers to %u\n", target); | ||
382 | if (target > peers_running) | 383 | if (target > peers_running) |
383 | { | 384 | { |
384 | delta = target - peers_running; | 385 | delta = target - peers_running; |
@@ -411,7 +412,7 @@ adjust_running_peers (unsigned int target) | |||
411 | * @param tc Task context. | 412 | * @param tc Task context. |
412 | */ | 413 | */ |
413 | static void | 414 | static void |
414 | next_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 415 | next_rnd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
415 | { | 416 | { |
416 | long round = (long) cls; | 417 | long round = (long) cls; |
417 | 418 | ||
@@ -421,12 +422,13 @@ next_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
421 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ROUND %ld\n", round); | 422 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ROUND %ld\n", round); |
422 | if (0.0 == rounds[round]) | 423 | if (0.0 == rounds[round]) |
423 | { | 424 | { |
425 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Finishing\n"); | ||
424 | GNUNET_SCHEDULER_add_now (&finish_profiler, NULL); | 426 | GNUNET_SCHEDULER_add_now (&finish_profiler, NULL); |
425 | return; | 427 | return; |
426 | } | 428 | } |
427 | adjust_running_peers (rounds[round] * TOTAL_PEERS); | 429 | adjust_running_peers (rounds[round] * TOTAL_PEERS); |
428 | 430 | ||
429 | GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_round, (void *) (round + 1)); | 431 | GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_rnd, (void *) (round + 1)); |
430 | } | 432 | } |
431 | 433 | ||
432 | 434 | ||
@@ -578,8 +580,9 @@ pong_handler (void *cls, struct GNUNET_MESH_Channel *channel, | |||
578 | 580 | ||
579 | GNUNET_break (0 != peer->timestamp.abs_value_us); | 581 | GNUNET_break (0 != peer->timestamp.abs_value_us); |
580 | latency = GNUNET_TIME_absolute_get_duration (peer->timestamp); | 582 | latency = GNUNET_TIME_absolute_get_duration (peer->timestamp); |
581 | FPRINTF (stderr, "%ld latency: %s\n", | 583 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u latency: %s\n", |
582 | n, GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); | 584 | get_index (peer), get_index (peer->dest), |
585 | GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); | ||
583 | 586 | ||
584 | if (GNUNET_SCHEDULER_NO_TASK == peer->ping_task) | 587 | if (GNUNET_SCHEDULER_NO_TASK == peer->ping_task) |
585 | { | 588 | { |
@@ -724,7 +727,7 @@ start_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
724 | &ping, &peers[i]); | 727 | &ping, &peers[i]); |
725 | } | 728 | } |
726 | peers_running = TOTAL_PEERS; | 729 | peers_running = TOTAL_PEERS; |
727 | GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_round, NULL); | 730 | GNUNET_SCHEDULER_add_delayed (ROUND_TIME, &next_rnd, NULL); |
728 | } | 731 | } |
729 | 732 | ||
730 | 733 | ||