diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-26 13:55:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-26 13:55:19 +0000 |
commit | fb55bbea31e2820414fd6f6f01fd5e46b32d9a71 (patch) | |
tree | 4da319280958d5b4dbb03402e22906a01a7d525a /src/transport/plugin_transport_unix.c | |
parent | 9b42f770681e66f682a6514b1fb75023d49d10dd (diff) | |
download | gnunet-fb55bbea31e2820414fd6f6f01fd5e46b32d9a71.tar.gz gnunet-fb55bbea31e2820414fd6f6f01fd5e46b32d9a71.zip |
UNIX stats
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r-- | src/transport/plugin_transport_unix.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 290640636..c688039e6 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -788,7 +788,7 @@ unix_plugin_send (void *cls, | |||
788 | GNUNET_CONTAINER_DLL_insert(plugin->msg_head, plugin->msg_tail, wrapper); | 788 | GNUNET_CONTAINER_DLL_insert(plugin->msg_head, plugin->msg_tail, wrapper); |
789 | 789 | ||
790 | plugin->bytes_in_queue += ssize; | 790 | plugin->bytes_in_queue += ssize; |
791 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue", | 791 | GNUNET_STATISTICS_set (plugin->env->stats,"# bytes currently in UNIX buffers", |
792 | plugin->bytes_in_queue, GNUNET_NO); | 792 | plugin->bytes_in_queue, GNUNET_NO); |
793 | 793 | ||
794 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Sent %d bytes to `%s'\n", ssize, | 794 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Sent %d bytes to `%s'\n", ssize, |
@@ -830,8 +830,10 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, | |||
830 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message from %s\n", | 830 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received message from %s\n", |
831 | un->sun_path); | 831 | un->sun_path); |
832 | 832 | ||
833 | |||
834 | |||
833 | plugin->bytes_in_recv += ntohs(currhdr->size); | 835 | plugin->bytes_in_recv += ntohs(currhdr->size); |
834 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received", | 836 | GNUNET_STATISTICS_set (plugin->env->stats,"# bytes received via UNIX", |
835 | plugin->bytes_in_recv, GNUNET_NO); | 837 | plugin->bytes_in_recv, GNUNET_NO); |
836 | 838 | ||
837 | addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path) + 1); | 839 | addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path) + 1); |
@@ -958,7 +960,7 @@ unix_plugin_select_write (struct Plugin * plugin) | |||
958 | 960 | ||
959 | GNUNET_assert (plugin->bytes_in_queue >= msgw->msgsize); | 961 | GNUNET_assert (plugin->bytes_in_queue >= msgw->msgsize); |
960 | plugin->bytes_in_queue -= msgw->msgsize; | 962 | plugin->bytes_in_queue -= msgw->msgsize; |
961 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue", | 963 | GNUNET_STATISTICS_set (plugin->env->stats, "# bytes currently in UNIX buffers", |
962 | plugin->bytes_in_queue, GNUNET_NO); | 964 | plugin->bytes_in_queue, GNUNET_NO); |
963 | plugin->bytes_discarded += msgw->msgsize; | 965 | plugin->bytes_discarded += msgw->msgsize; |
964 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes discarded", | 966 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes discarded", |
@@ -976,10 +978,10 @@ unix_plugin_select_write (struct Plugin * plugin) | |||
976 | 978 | ||
977 | GNUNET_assert (plugin->bytes_in_queue >= msgw->msgsize); | 979 | GNUNET_assert (plugin->bytes_in_queue >= msgw->msgsize); |
978 | plugin->bytes_in_queue -= msgw->msgsize; | 980 | plugin->bytes_in_queue -= msgw->msgsize; |
979 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes in send queue", | 981 | GNUNET_STATISTICS_set (plugin->env->stats,"# bytes currently in UNIX buffers", |
980 | plugin->bytes_in_queue, GNUNET_NO); | 982 | plugin->bytes_in_queue, GNUNET_NO); |
981 | plugin->bytes_in_sent += msgw->msgsize; | 983 | plugin->bytes_in_sent += msgw->msgsize; |
982 | GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes sent", | 984 | GNUNET_STATISTICS_set (plugin->env->stats,"# bytes transmitted via UNIX", |
983 | plugin->bytes_in_sent, GNUNET_NO); | 985 | plugin->bytes_in_sent, GNUNET_NO); |
984 | 986 | ||
985 | GNUNET_free (msgw->msg); | 987 | GNUNET_free (msgw->msg); |