commit 80f33364925f6718673dafaf7f06940c2b06af06
parent 1310298005df1c914d6c5d36c5f66a78fc8ebee9
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 27 Jan 2017 17:29:15 +0100
add statistics for packets dropped by cadet due to full buffer
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c
@@ -210,7 +210,11 @@ route_message (struct CadetPeer *prev,
GCP_2s (prev),
GNUNET_i2s (GCP_get_id (dir->hop)),
GNUNET_sh2s (&cid->connection_of_tunnel));
- GNUNET_assert (dir->out_rpos == dir->out_wpos);
+ GNUNET_STATISTICS_update (stats,
+ "# messages dropped due to full buffer",
+ 1,
+ GNUNET_NO);
+ GNUNET_assert (dir->out_rpos == dir->out_wpos);
GNUNET_MQ_discard (env);
dir->out_rpos++;
if (ROUTE_BUFFER_SIZE == dir->out_rpos)