This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 5195d61b6f6 [fix](profile) update_rpc_time when enable_verbose_profile = false (#43096) 5195d61b6f6 is described below commit 5195d61b6f6840a8073076095e6df04c00cd97c5 Author: Mryange <59914473+mrya...@users.noreply.github.com> AuthorDate: Sat Nov 9 22:17:29 2024 +0800 [fix](profile) update_rpc_time when enable_verbose_profile = false (#43096) ### What problem does this PR solve? If enable_verbose_profile is false, update_rpc_time will not be called, and RPC count, max, and min statistics will not be recorded. ``` - RpcCount: 0 - RpcMaxTime: 0ns - RpcMinTime: 0ns - RpcSumTime: 0ns ``` Co-authored-by: Mryange <yanxuech...@selectdb.com> --- be/src/pipeline/exec/exchange_sink_buffer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/be/src/pipeline/exec/exchange_sink_buffer.cpp b/be/src/pipeline/exec/exchange_sink_buffer.cpp index 63b69713f0d..af66eedc1e0 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.cpp +++ b/be/src/pipeline/exec/exchange_sink_buffer.cpp @@ -300,10 +300,10 @@ Status ExchangeSinkBuffer<Parent>::_send_rpc(InstanceLoId id) { } // attach task for memory tracker and query id when core SCOPED_ATTACH_TASK(_state); - if (_state->enable_verbose_profile()) { - auto end_rpc_time = GetCurrentTimeNanos(); - update_rpc_time(id, start_rpc_time, end_rpc_time); - } + + auto end_rpc_time = GetCurrentTimeNanos(); + update_rpc_time(id, start_rpc_time, end_rpc_time); + Status s(Status::create(result.status())); if (s.is<ErrorCode::END_OF_FILE>()) { _set_receiver_eof(id); @@ -381,10 +381,10 @@ Status ExchangeSinkBuffer<Parent>::_send_rpc(InstanceLoId id) { } // attach task for memory tracker and query id when core SCOPED_ATTACH_TASK(_state); - if (_state->enable_verbose_profile()) { - auto end_rpc_time = GetCurrentTimeNanos(); - update_rpc_time(id, start_rpc_time, end_rpc_time); - } + + auto end_rpc_time = GetCurrentTimeNanos(); + update_rpc_time(id, start_rpc_time, end_rpc_time); + Status s(Status::create(result.status())); if (s.is<ErrorCode::END_OF_FILE>()) { _set_receiver_eof(id); @@ -529,10 +529,10 @@ void ExchangeSinkBuffer<Parent>::update_rpc_time(InstanceLoId id, int64_t start_ template <typename Parent> void ExchangeSinkBuffer<Parent>::update_profile(RuntimeProfile* profile) { - auto* _max_rpc_timer = ADD_TIMER(profile, "RpcMaxTime"); + auto* _max_rpc_timer = ADD_TIMER_WITH_LEVEL(profile, "RpcMaxTime", 1); auto* _min_rpc_timer = ADD_TIMER(profile, "RpcMinTime"); auto* _sum_rpc_timer = ADD_TIMER(profile, "RpcSumTime"); - auto* _count_rpc = ADD_COUNTER(profile, "RpcCount", TUnit::UNIT); + auto* _count_rpc = ADD_COUNTER_WITH_LEVEL(profile, "RpcCount", TUnit::UNIT, 1); auto* _avg_rpc_timer = ADD_TIMER(profile, "RpcAvgTime"); int64_t max_rpc_time = 0, min_rpc_time = 0; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org