diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-09-24 01:40:34 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-24 03:53:51 -0700 |
commit | 6965560fe9f9291093e9d91c5787ce0374371eb8 (patch) | |
tree | 88520884c7cfa20e0df99235a6bfa648d132eaa8 /rpc | |
parent | 0209aab58c56e06fd86487be76312d04fd8f5593 (diff) |
rpc-clnt: print frame-sent time till microsecond resolution in call_bail.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 4cb2c52c680..6548f73b0e4 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -136,7 +136,7 @@ call_bail (void *data) struct saved_frame *trav = NULL; struct saved_frame *tmp = NULL; struct tm frame_sent_tm; - char frame_sent[32] = {0,}; + char frame_sent[256] = {0,}; struct timeval timeout = {0,}; struct iovec iov = {0,}; @@ -184,6 +184,9 @@ call_bail (void *data) list_for_each_entry_safe (trav, tmp, &list, list) { localtime_r (&trav->saved_at.tv_sec, &frame_sent_tm); strftime (frame_sent, 32, "%Y-%m-%d %H:%M:%S", &frame_sent_tm); + snprintf (frame_sent + strlen (frame_sent), + 256 - strlen (frame_sent), + ".%"GF_PRI_SUSECONDS, trav->saved_at.tv_usec); gf_log (conn->trans->name, GF_LOG_ERROR, "bailing out frame type(%s) op(%s(%d)) xid = 0x%lx " |