diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-18 19:21:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-18 19:21:18 +0000 |
commit | 2a5b881571e0ec43a568d2dc870674670912d88d (patch) | |
tree | 7833421926ef2708d492b068264c7ea0751d60d7 /src/transport/plugin_transport_udp.c | |
parent | e029441fb8a138c17e3af50f1299281ee39f8c39 (diff) | |
download | gnunet-2a5b881571e0ec43a568d2dc870674670912d88d.tar.gz gnunet-2a5b881571e0ec43a568d2dc870674670912d88d.zip |
-log expected transmission time on enqueue, together with queue size
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 27ebad74d..814064e48 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2022,6 +2022,7 @@ udp_plugin_send (void *cls, | |||
2022 | struct UDP_MessageWrapper *udpw; | 2022 | struct UDP_MessageWrapper *udpw; |
2023 | struct UDPMessage *udp; | 2023 | struct UDPMessage *udp; |
2024 | char mbuf[udpmlen] GNUNET_ALIGN; | 2024 | char mbuf[udpmlen] GNUNET_ALIGN; |
2025 | struct GNUNET_TIME_Relative latency; | ||
2025 | 2026 | ||
2026 | if ( (sizeof(struct IPv6UdpAddress) == s->address->address_length) && | 2027 | if ( (sizeof(struct IPv6UdpAddress) == s->address->address_length) && |
2027 | (NULL == plugin->sockv6) ) | 2028 | (NULL == plugin->sockv6) ) |
@@ -2132,6 +2133,22 @@ udp_plugin_send (void *cls, | |||
2132 | frag_ctx); | 2133 | frag_ctx); |
2133 | s->frag_ctx = frag_ctx; | 2134 | s->frag_ctx = frag_ctx; |
2134 | s->last_transmit_time = frag_ctx->next_frag_time; | 2135 | s->last_transmit_time = frag_ctx->next_frag_time; |
2136 | latency = GNUNET_TIME_absolute_get_remaining (s->last_transmit_time); | ||
2137 | if (latency.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us) | ||
2138 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
2139 | "Enqueued fragments will take %s for transmission to %s (queue size: %u)\n", | ||
2140 | GNUNET_STRINGS_relative_time_to_string (latency, | ||
2141 | GNUNET_YES), | ||
2142 | GNUNET_i2s (&s->target), | ||
2143 | (unsigned int) s->msgs_in_queue); | ||
2144 | else | ||
2145 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
2146 | "Enqueued fragments will take %s for transmission to %s (queue size: %u)\n", | ||
2147 | GNUNET_STRINGS_relative_time_to_string (latency, | ||
2148 | GNUNET_YES), | ||
2149 | GNUNET_i2s (&s->target), | ||
2150 | (unsigned int) s->msgs_in_queue); | ||
2151 | |||
2135 | GNUNET_STATISTICS_update (plugin->env->stats, | 2152 | GNUNET_STATISTICS_update (plugin->env->stats, |
2136 | "# UDP, fragmented messages active", | 2153 | "# UDP, fragmented messages active", |
2137 | 1, | 2154 | 1, |