From 6965560fe9f9291093e9d91c5787ce0374371eb8 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Fri, 24 Sep 2010 01:40:34 +0000 Subject: rpc-clnt: print frame-sent time till microsecond resolution in call_bail. Signed-off-by: Raghavendra G Signed-off-by: Vijay Bellur 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 --- rpc/rpc-lib/src/rpc-clnt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 " -- cgit