summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h3
-rw-r--r--rpc/rpc-transport/socket/src/socket.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index cccae5f261d..2ba46fba9f7 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -198,6 +198,9 @@ struct rpc_transport {
peer_info_t peerinfo;
peer_info_t myinfo;
+ uint64_t total_bytes_read;
+ uint64_t total_bytes_write;
+
struct list_head list;
};
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) {