Commit ebad442b authored by zhujiashun's avatar zhujiashun

add set_server_latency func

parent 093dcb3e
...@@ -351,8 +351,7 @@ void ProcessRpcRequest(InputMessageBase* msg_base) { ...@@ -351,8 +351,7 @@ void ProcessRpcRequest(InputMessageBase* msg_base) {
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_auth_context(socket->auth_context()) .set_auth_context(socket->auth_context())
.set_request_protocol(PROTOCOL_BAIDU_STD) .set_request_protocol(PROTOCOL_BAIDU_STD)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
if (meta.has_stream_settings()) { if (meta.has_stream_settings()) {
......
...@@ -1237,8 +1237,7 @@ void ProcessHttpRequest(InputMessageBase *msg) { ...@@ -1237,8 +1237,7 @@ void ProcessHttpRequest(InputMessageBase *msg) {
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_auth_context(socket->auth_context()) .set_auth_context(socket->auth_context())
.set_request_protocol(PROTOCOL_HTTP) .set_request_protocol(PROTOCOL_HTTP)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
// Read log-id. errno may be set when input to strtoull overflows. // Read log-id. errno may be set when input to strtoull overflows.
......
...@@ -384,8 +384,7 @@ void ProcessHuluRequest(InputMessageBase* msg_base) { ...@@ -384,8 +384,7 @@ void ProcessHuluRequest(InputMessageBase* msg_base) {
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_auth_context(socket->auth_context()) .set_auth_context(socket->auth_context())
.set_request_protocol(PROTOCOL_HULU_PBRPC) .set_request_protocol(PROTOCOL_HULU_PBRPC)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
if (meta.has_user_data()) { if (meta.has_user_data()) {
......
...@@ -206,8 +206,7 @@ void ProcessMongoRequest(InputMessageBase* msg_base) { ...@@ -206,8 +206,7 @@ void ProcessMongoRequest(InputMessageBase* msg_base) {
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_auth_context(socket->auth_context()) .set_auth_context(socket->auth_context())
.set_request_protocol(PROTOCOL_MONGO) .set_request_protocol(PROTOCOL_MONGO)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
// Tag the bthread with this server's key for // Tag the bthread with this server's key for
......
...@@ -262,8 +262,7 @@ void ProcessNsheadRequest(InputMessageBase* msg_base) { ...@@ -262,8 +262,7 @@ void ProcessNsheadRequest(InputMessageBase* msg_base) {
.set_remote_side(socket->remote_side()) .set_remote_side(socket->remote_side())
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_request_protocol(PROTOCOL_NSHEAD) .set_request_protocol(PROTOCOL_NSHEAD)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
// Tag the bthread with this server's key for thread_local_data(). // Tag the bthread with this server's key for thread_local_data().
......
...@@ -352,8 +352,7 @@ void ProcessSofaRequest(InputMessageBase* msg_base) { ...@@ -352,8 +352,7 @@ void ProcessSofaRequest(InputMessageBase* msg_base) {
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_auth_context(socket->auth_context()) .set_auth_context(socket->auth_context())
.set_request_protocol(PROTOCOL_SOFA_PBRPC) .set_request_protocol(PROTOCOL_SOFA_PBRPC)
.set_begin_time_us(msg->received_us()) .set_server_latency(msg->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
// Tag the bthread with this server's key for thread_local_data(). // Tag the bthread with this server's key for thread_local_data().
......
...@@ -465,8 +465,7 @@ void ProcessThriftRequest(InputMessageBase* msg_base) { ...@@ -465,8 +465,7 @@ void ProcessThriftRequest(InputMessageBase* msg_base) {
.set_remote_side(socket->remote_side()) .set_remote_side(socket->remote_side())
.set_local_side(socket->local_side()) .set_local_side(socket->local_side())
.set_request_protocol(PROTOCOL_THRIFT) .set_request_protocol(PROTOCOL_THRIFT)
.set_begin_time_us(msg_base->received_us()) .set_server_latency(msg_base->received_us())
.set_end_time_us(butil::cpuwide_time_us())
.move_in_server_receiving_sock(socket_guard); .move_in_server_receiving_sock(socket_guard);
uint32_t seq_id; uint32_t seq_id;
......
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