summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-14 03:54:39 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-14 04:37:12 -0700
commitbc4f737210bc0971d031cf9b3ff8fe941482eabc (patch)
tree9a42376cc79e4ae195567626a8ab377f236db8c6 /rpc/rpc-transport/socket/src
parentff9eb1d536f2c57ec216b9ce8b96d1f536984008 (diff)
socket: add xfer data counts
* keeping track of data transfered over wire helps to identify the protocol overhead, and also can help us in debugging more on server loads Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'rpc/rpc-transport/socket/src')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 9e85c3ca902..1d6ebc803fb 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -176,12 +176,14 @@ __socket_rwv (rpc_transport_t *this, struct iovec *vector, int count,
/* done for now */
break;
}
+ this->total_bytes_write += ret;
} else {
ret = readv (sock, opvector, opcount);
if (ret == -1 && errno == EAGAIN) {
/* done for now */
break;
}
+ this->total_bytes_read += ret;
}
if (ret == 0) {