diff --git a/include/nfsc/libnfs-raw.h b/include/nfsc/libnfs-raw.h index b4f371c0..adfec621 100644 --- a/include/nfsc/libnfs-raw.h +++ b/include/nfsc/libnfs-raw.h @@ -130,9 +130,9 @@ struct rpc_pdu_stats { uint32_t prog; uint32_t vers; uint32_t proc; - uint64_t enqueue_time; /* us, when the pdu was enqueued */ - uint64_t send_time; /* us, when the pdu was sent */ - uint64_t response_time; /* us, only valid in replies */ + uint64_t enqueue_timestamp; /* us, when the pdu was enqueued */ + uint64_t send_timestamp; /* us, when the pdu was sent */ + uint64_t response_time; /* us, only valid in replies */ }; typedef void (*rpc_stats_cb)(struct rpc_context *rpc, struct rpc_pdu_stats *data, diff --git a/lib/pdu.c b/lib/pdu.c index b9d3d0ed..117e1171 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -566,7 +566,7 @@ int rpc_queue_pdu(struct rpc_context *rpc, struct rpc_pdu *pdu) recordmarker = htonl(size | 0x80000000); memcpy(pdu->out.iov[0].buf, &recordmarker, 4); - pdu->pdu_stats.enqueue_time = rpc_current_time_us(); + pdu->pdu_stats.enqueue_timestamp = rpc_current_time_us(); pdu->pdu_stats.size = size; pdu->pdu_stats.xid = pdu->msg.xid; pdu->pdu_stats.direction = CALL; @@ -882,7 +882,7 @@ static int rpc_process_reply(struct rpc_context *rpc, ZDR *zdr) pdu->pdu_stats.size = rpc->rm_xid[0]; pdu->pdu_stats.direction = REPLY; pdu->pdu_stats.status = msg.body.rbody.stat; - pdu->pdu_stats.response_time = rpc_current_time_us() - pdu->pdu_stats.send_time; + pdu->pdu_stats.response_time = rpc_current_time_us() - pdu->pdu_stats.send_timestamp; if (rpc->stats_cb) { rpc->stats_cb(rpc, &pdu->pdu_stats, rpc->stats_private_data); } diff --git a/lib/socket.c b/lib/socket.c index d31ede47..a55e3b25 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -421,7 +421,7 @@ rpc_write_to_socket(struct rpc_context *rpc) rpc_enqueue(&rpc->waitpdu[hash], pdu); rpc->waitpdu_len++; - pdu->pdu_stats.send_time = rpc_current_time_us(); + pdu->pdu_stats.send_timestamp = rpc_current_time_us(); if (rpc->stats_cb) { rpc->stats_cb(rpc, &pdu->pdu_stats, rpc->stats_private_data); }