[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21416 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21416 - gnunet/src/transport |
Date: |
Thu, 10 May 2012 16:07:52 +0200 |
Author: wachs
Date: 2012-05-10 16:07:52 +0200 (Thu, 10 May 2012)
New Revision: 21416
Modified:
gnunet/src/transport/plugin_transport_unix.c
Log:
- more statistics
Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c 2012-05-10 14:01:19 UTC
(rev 21415)
+++ gnunet/src/transport/plugin_transport_unix.c 2012-05-10 14:07:52 UTC
(rev 21416)
@@ -236,6 +236,9 @@
struct GNUNET_ATS_Information ats_network;
unsigned int bytes_in_queue;
+ unsigned int bytes_in_sent;
+ unsigned int bytes_in_recv;
+ unsigned int bytes_discarded;
};
@@ -736,6 +739,11 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received message from %s\n",
un->sun_path);
+
+ plugin->bytes_in_recv += ntohs(currhdr->size);
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received",
+ plugin->bytes_in_recv, GNUNET_NO);
+
plugin->env->receive (plugin->env->cls, sender, currhdr,
(const struct GNUNET_ATS_Information *) &ats, 2,
NULL, un->sun_path, strlen (un->sun_path) + 1);
@@ -804,6 +812,7 @@
GNUNET_break_op (0);
break;
}
+
unix_demultiplexer (plugin, &sender, currhdr, &un, sizeof (un));
offset += csize;
}
@@ -854,6 +863,9 @@
plugin->bytes_in_queue -= msgw->msgsize;
GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue",
plugin->bytes_in_queue, GNUNET_NO);
+ plugin->bytes_discarded += msgw->msgsize;
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes discarded",
+ plugin->bytes_discarded, GNUNET_NO);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);
@@ -869,6 +881,9 @@
plugin->bytes_in_queue -= msgw->msgsize;
GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue",
plugin->bytes_in_queue, GNUNET_NO);
+ plugin->bytes_in_sent += msgw->msgsize;
+ GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes sent",
+ plugin->bytes_in_sent, GNUNET_NO);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21416 - gnunet/src/transport,
gnunet <=