Commit edca515b authored by Anmol Vatsa's avatar Anmol Vatsa

add some more log for remote and local revoke time

parent 3f2dfa87
......@@ -1617,7 +1617,7 @@ int cn_dispatch_revoke(cn_principal_t * as, cn_dispatch_result_t *result,
struct timespec endtime;
clock_gettime(CLOCK_REALTIME, &endtime);
c_log_debug("DEBUG:%s:%lu.%lu:End", __func__, endtime.tv_sec, endtime.tv_nsec);
c_log_debug("DEBUG:%s:%lu:End-Start", __func__, mytimediff(starttime, endtime));
c_log_debug("DEBUG:%s:End-Start:%lu", __func__, mytimediff(starttime, endtime));
return 0;
}
......
......@@ -416,9 +416,9 @@ int handle_grant_remote_cap_messages(struct RPCEndPoint* endpoint, ControllerRPC
* subsec: Handle Remote Revoke request
******************************************************************************/
int handle_remote_revoke_messages(struct RPCEndPoint* endpoint, ControllerRPC__RPCMessage *request) {
struct timespec timespec;
clock_gettime(CLOCK_REALTIME, &timespec);
c_log_debug("DEBUG:%s:%lu.%lu:Start", __func__, timespec.tv_sec, timespec.tv_nsec);
struct timespec starttime;
clock_gettime(CLOCK_REALTIME, &starttime);
c_log_debug("DEBUG:%s:%lu.%lu:Start", __func__, starttime.tv_sec, starttime.tv_nsec);
int res = 0;
const char* from_ctlr_id = request->from_ctlr_id;
......@@ -465,6 +465,8 @@ int handle_remote_revoke_messages(struct RPCEndPoint* endpoint, ControllerRPC__R
return_resp->return_msg = 0;
rpc_resp->return_response = return_resp;
struct timespec beforesendtime;
clock_gettime(CLOCK_REALTIME, &beforesendtime);
send_fail_resp:
if( rpc_message_send(endpoint, rpc_resp) < 0) {
c_log_err("ERROR:%s:Could not a response to RemoteRevoke Req", __func__);
......@@ -476,8 +478,10 @@ int handle_remote_revoke_messages(struct RPCEndPoint* endpoint, ControllerRPC__R
free(rpc_resp->return_msg);
free(rpc_resp);
clock_gettime(CLOCK_REALTIME, &timespec);
c_log_debug("DEBUG:%s:%lu.%lu:End", __func__, timespec.tv_sec, timespec.tv_nsec);
struct timespec endtime;
clock_gettime(CLOCK_REALTIME, &endtime);
c_log_debug("DEBUG:%s:%lu.%lu:End", __func__, endtime.tv_sec, endtime.tv_nsec);
c_log_debug("DEBUG:%s:End-Start:%lu", __func__, mytimediff(starttime, beforesendtime));
return res;
}
......@@ -1974,6 +1978,7 @@ int proxy_node_grant_remote_cap(struct cnode* node_grant_cnode, cn_principal_t*
clock_gettime(CLOCK_REALTIME, &endtime);
c_log_debug("DEBUG:%s:%lu.%lu:End", __func__, endtime.tv_sec, endtime.tv_nsec);
c_log_debug("DEBUG:%s:End-Start:%lu", __func__, mytimediff(starttime, endtime) - mytimediff(reqstarttime, reqendtime));
c_log_debug("DEBUG:%s:NW End-Start:%lu", __func__, mytimediff(starttime, endtime));
return res;
}
/******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment