diff options
author | Julius Bünger <buenger@mytum.de> | 2018-07-10 11:00:06 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-07-10 11:01:12 +0200 |
commit | 041218a66dff4e23ac0944a7c1bca7b0833fc2fe (patch) | |
tree | d4de454d6c121445f564e74aea242b9bb61d3644 /src/rps/gnunet-rps-profiler.c | |
parent | cacaac22f864f31e41b3600d9eb4babbe7af9fd9 (diff) | |
download | gnunet-041218a66dff4e23ac0944a7c1bca7b0833fc2fe.tar.gz gnunet-041218a66dff4e23ac0944a7c1bca7b0833fc2fe.zip |
rps profiler: logging and indentation
Diffstat (limited to 'src/rps/gnunet-rps-profiler.c')
-rw-r--r-- | src/rps/gnunet-rps-profiler.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index 09797eaf7..26675d782 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c | |||
@@ -882,7 +882,7 @@ shutdown_op (void *cls) | |||
882 | { | 882 | { |
883 | unsigned int i; | 883 | unsigned int i; |
884 | 884 | ||
885 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 885 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
886 | "Shutdown task scheduled, going down.\n"); | 886 | "Shutdown task scheduled, going down.\n"); |
887 | in_shutdown = GNUNET_YES; | 887 | in_shutdown = GNUNET_YES; |
888 | if (NULL != post_test_task) | 888 | if (NULL != post_test_task) |
@@ -1033,9 +1033,9 @@ info_cb (void *cb_cls, | |||
1033 | */ | 1033 | */ |
1034 | static void | 1034 | static void |
1035 | rps_connect_complete_cb (void *cls, | 1035 | rps_connect_complete_cb (void *cls, |
1036 | struct GNUNET_TESTBED_Operation *op, | 1036 | struct GNUNET_TESTBED_Operation *op, |
1037 | void *ca_result, | 1037 | void *ca_result, |
1038 | const char *emsg) | 1038 | const char *emsg) |
1039 | { | 1039 | { |
1040 | struct RPSPeer *rps_peer = cls; | 1040 | struct RPSPeer *rps_peer = cls; |
1041 | struct GNUNET_RPS_Handle *rps = ca_result; | 1041 | struct GNUNET_RPS_Handle *rps = ca_result; |
@@ -1060,7 +1060,9 @@ rps_connect_complete_cb (void *cls, | |||
1060 | return; | 1060 | return; |
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started client successfully\n"); | 1063 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1064 | "Started client successfully (%u)\n", | ||
1065 | rps_peer->index); | ||
1064 | 1066 | ||
1065 | cur_test_run.main_test (rps_peer); | 1067 | cur_test_run.main_test (rps_peer); |
1066 | } | 1068 | } |
@@ -1078,7 +1080,7 @@ rps_connect_complete_cb (void *cls, | |||
1078 | */ | 1080 | */ |
1079 | static void * | 1081 | static void * |
1080 | rps_connect_adapter (void *cls, | 1082 | rps_connect_adapter (void *cls, |
1081 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 1083 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
1082 | { | 1084 | { |
1083 | struct GNUNET_RPS_Handle *h; | 1085 | struct GNUNET_RPS_Handle *h; |
1084 | 1086 | ||
@@ -1170,12 +1172,14 @@ stat_complete_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | |||
1170 | */ | 1172 | */ |
1171 | static void | 1173 | static void |
1172 | rps_disconnect_adapter (void *cls, | 1174 | rps_disconnect_adapter (void *cls, |
1173 | void *op_result) | 1175 | void *op_result) |
1174 | { | 1176 | { |
1175 | struct RPSPeer *peer = cls; | 1177 | struct RPSPeer *peer = cls; |
1176 | struct GNUNET_RPS_Handle *h = op_result; | 1178 | struct GNUNET_RPS_Handle *h = op_result; |
1177 | 1179 | ||
1178 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnect_adapter()\n"); | 1180 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1181 | "disconnect_adapter (%u)\n", | ||
1182 | peer->index); | ||
1179 | GNUNET_assert (NULL != peer); | 1183 | GNUNET_assert (NULL != peer); |
1180 | if (NULL != peer->rps_handle) | 1184 | if (NULL != peer->rps_handle) |
1181 | { | 1185 | { |
@@ -2556,6 +2560,8 @@ test_run (void *cls, | |||
2556 | /* Connect all peers to statistics service */ | 2560 | /* Connect all peers to statistics service */ |
2557 | if (COLLECT_STATISTICS == cur_test_run.have_collect_statistics) | 2561 | if (COLLECT_STATISTICS == cur_test_run.have_collect_statistics) |
2558 | { | 2562 | { |
2563 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2564 | "Connecting to statistics service\n"); | ||
2559 | rps_peers[i].stat_op = | 2565 | rps_peers[i].stat_op = |
2560 | GNUNET_TESTBED_service_connect (NULL, | 2566 | GNUNET_TESTBED_service_connect (NULL, |
2561 | peers[i], | 2567 | peers[i], |
@@ -2571,9 +2577,8 @@ test_run (void *cls, | |||
2571 | if (NULL != churn_task) | 2577 | if (NULL != churn_task) |
2572 | GNUNET_SCHEDULER_cancel (churn_task); | 2578 | GNUNET_SCHEDULER_cancel (churn_task); |
2573 | post_test_task = GNUNET_SCHEDULER_add_delayed (timeout, &post_test_op, NULL); | 2579 | post_test_task = GNUNET_SCHEDULER_add_delayed (timeout, &post_test_op, NULL); |
2574 | timeout = GNUNET_TIME_relative_multiply (timeout, 0.2 + (0.01 * num_peers)); | 2580 | timeout = GNUNET_TIME_relative_multiply (timeout, 1.2 + (0.01 * num_peers)); |
2575 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "timeout for hard shutdown is %u\n", timeout.rel_value_us/1000000); | 2581 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "timeout for hard shutdown is %lu\n", timeout.rel_value_us/1000000); |
2576 | shutdown_task = GNUNET_SCHEDULER_add_shutdown (shutdown_op, NULL); | ||
2577 | shutdown_task = GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL); | 2582 | shutdown_task = GNUNET_SCHEDULER_add_delayed (timeout, &shutdown_op, NULL); |
2578 | 2583 | ||
2579 | } | 2584 | } |
@@ -2734,7 +2739,6 @@ main (int argc, char *argv[]) | |||
2734 | GNUNET_free (rps_peers); | 2739 | GNUNET_free (rps_peers); |
2735 | GNUNET_free (rps_peer_ids); | 2740 | GNUNET_free (rps_peer_ids); |
2736 | GNUNET_CONTAINER_multipeermap_destroy (peer_map); | 2741 | GNUNET_CONTAINER_multipeermap_destroy (peer_map); |
2737 | printf ("test -1\n"); | ||
2738 | return ret_value; | 2742 | return ret_value; |
2739 | } | 2743 | } |
2740 | 2744 | ||