This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit dbbdf63fecf22d0e767ad04e31fe2fae30e7ada8
Author: Mryange <[email protected]>
AuthorDate: Tue Jul 18 18:09:42 2023 +0800

    [feature](profile) add process hashtable time in join node (#21878)
    
    add process hashtable time in join node
---
 be/src/vec/exec/join/process_hash_table_probe.h      | 2 +-
 be/src/vec/exec/join/process_hash_table_probe_impl.h | 4 +++-
 be/src/vec/exec/join/vhash_join_node.cpp             | 2 ++
 be/src/vec/exec/join/vhash_join_node.h               | 1 +
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/exec/join/process_hash_table_probe.h 
b/be/src/vec/exec/join/process_hash_table_probe.h
index 6b95b6e3e0..49f2d956c9 100644
--- a/be/src/vec/exec/join/process_hash_table_probe.h
+++ b/be/src/vec/exec/join/process_hash_table_probe.h
@@ -97,7 +97,7 @@ struct ProcessHashTableProbe {
     RuntimeProfile::Counter* _search_hashtable_timer;
     RuntimeProfile::Counter* _build_side_output_timer;
     RuntimeProfile::Counter* _probe_side_output_timer;
-
+    RuntimeProfile::Counter* _probe_process_hashtable_timer;
     static constexpr int PROBE_SIDE_EXPLODE_RATE = 3;
 };
 
diff --git a/be/src/vec/exec/join/process_hash_table_probe_impl.h 
b/be/src/vec/exec/join/process_hash_table_probe_impl.h
index 341adcbfc5..10297b9080 100644
--- a/be/src/vec/exec/join/process_hash_table_probe_impl.h
+++ b/be/src/vec/exec/join/process_hash_table_probe_impl.h
@@ -47,7 +47,8 @@ 
ProcessHashTableProbe<JoinOpType>::ProcessHashTableProbe(HashJoinNode* join_node
           _rows_returned_counter(join_node->_rows_returned_counter),
           _search_hashtable_timer(join_node->_search_hashtable_timer),
           _build_side_output_timer(join_node->_build_side_output_timer),
-          _probe_side_output_timer(join_node->_probe_side_output_timer) {}
+          _probe_side_output_timer(join_node->_probe_side_output_timer),
+          
_probe_process_hashtable_timer(join_node->_probe_process_hashtable_timer) {}
 
 template <int JoinOpType>
 template <bool have_other_join_conjunct>
@@ -1048,6 +1049,7 @@ Status 
ProcessHashTableProbe<JoinOpType>::process_data_in_hashtable(HashTableTyp
                                                                     Block* 
output_block,
                                                                     bool* eos) 
{
     using Mapped = typename HashTableType::Mapped;
+    SCOPED_TIMER(_probe_process_hashtable_timer);
     if constexpr (std::is_same_v<Mapped, RowRefListWithFlag> ||
                   std::is_same_v<Mapped, RowRefListWithFlags>) {
         hash_table_ctx.init_once();
diff --git a/be/src/vec/exec/join/vhash_join_node.cpp 
b/be/src/vec/exec/join/vhash_join_node.cpp
index 05976acadc..7d9d3ebd89 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -471,6 +471,8 @@ Status HashJoinNode::prepare(RuntimeState* state) {
             ADD_CHILD_TIMER(probe_phase_profile, 
"ProbeWhenBuildSideOutputTime", "ProbeTime");
     _probe_side_output_timer =
             ADD_CHILD_TIMER(probe_phase_profile, 
"ProbeWhenProbeSideOutputTime", "ProbeTime");
+    _probe_process_hashtable_timer =
+            ADD_CHILD_TIMER(probe_phase_profile, 
"ProbeWhenProcessHashTableTime", "ProbeTime");
     _open_timer = ADD_TIMER(runtime_profile(), "OpenTime");
     _allocate_resource_timer = ADD_TIMER(runtime_profile(), 
"AllocateResourceTime");
     _process_other_join_conjunct_timer = ADD_TIMER(runtime_profile(), 
"OtherJoinConjunctTime");
diff --git a/be/src/vec/exec/join/vhash_join_node.h 
b/be/src/vec/exec/join/vhash_join_node.h
index 3d85d6b227..096a9148cc 100644
--- a/be/src/vec/exec/join/vhash_join_node.h
+++ b/be/src/vec/exec/join/vhash_join_node.h
@@ -304,6 +304,7 @@ private:
     RuntimeProfile::Counter* _search_hashtable_timer;
     RuntimeProfile::Counter* _build_side_output_timer;
     RuntimeProfile::Counter* _probe_side_output_timer;
+    RuntimeProfile::Counter* _probe_process_hashtable_timer;
     RuntimeProfile::Counter* _build_side_compute_hash_timer;
     RuntimeProfile::Counter* _build_side_merge_block_timer;
     RuntimeProfile::Counter* _build_runtime_filter_timer;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to