diff options
Diffstat (limited to 'src/transport/test_transport_plugin_cmd_simple_send_performance.c')
-rw-r--r-- | src/transport/test_transport_plugin_cmd_simple_send_performance.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_performance.c b/src/transport/test_transport_plugin_cmd_simple_send_performance.c index 2251f9849..013a3c2b2 100644 --- a/src/transport/test_transport_plugin_cmd_simple_send_performance.c +++ b/src/transport/test_transport_plugin_cmd_simple_send_performance.c | |||
@@ -169,23 +169,26 @@ handle_test (void *cls, | |||
169 | time_traveled.rel_value_us); | 169 | time_traveled.rel_value_us); |
170 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 170 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
171 | "mean time traveled: %s %llu messages received with message number %u\n", | 171 | "mean time traveled: %s %llu messages received with message number %u\n", |
172 | GNUNET_STRINGS_relative_time_to_string (sender->mean_time, GNUNET_NO), | 172 | GNUNET_STRINGS_relative_time_to_string (sender->mean_time, |
173 | GNUNET_NO), | ||
173 | sender->num_received, | 174 | sender->num_received, |
174 | num); | 175 | num); |
175 | if (MAX_RECEIVED <= sender->num_received && NULL == ac->cont) | 176 | if (floor (MAX_RECEIVED * (1 - 1.0 / 200)) < sender->num_received && NULL == |
177 | ac->cont) | ||
176 | { | 178 | { |
177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
178 | "time traveled failed\n"); | 180 | "time traveled failed\n"); |
179 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); | 181 | // GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac); |
180 | } | 182 | } |
181 | else if (MAX_RECEIVED <= sender->num_received) | 183 | else if (floor (MAX_RECEIVED * (1 - 1.0 / 200)) < sender->num_received && |
184 | GNUNET_NO == ac->finished) | ||
182 | { | 185 | { |
183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 186 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
184 | "time traveled finish\n"); | 187 | "time traveled finish\n"); |
185 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); | 188 | GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac); |
186 | } | 189 | } |
187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 190 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
188 | "time traveled end\n"); | 191 | "time traveled end\n"); |
189 | GNUNET_TRANSPORT_core_receive_continue (ch, peer); | 192 | GNUNET_TRANSPORT_core_receive_continue (ch, peer); |
190 | } | 193 | } |
191 | 194 | ||