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

gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new d5af4f6558 [Neried](Profile) Add projection timer for neried (#14286)
d5af4f6558 is described below

commit d5af4f65589a2aec7434f91f0f065917929b61fe
Author: HappenLee <happen...@hotmail.com>
AuthorDate: Thu Nov 17 22:17:55 2022 +0800

    [Neried](Profile) Add projection timer for neried (#14286)
---
 be/src/exec/exec_node.cpp                | 5 +++--
 be/src/exec/exec_node.h                  | 1 +
 be/src/vec/exec/join/vjoin_node_base.cpp | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp
index 97ccf5f701..afdccd97af 100644
--- a/be/src/exec/exec_node.cpp
+++ b/be/src/exec/exec_node.cpp
@@ -211,6 +211,7 @@ Status ExecNode::init(const TPlanNode& tnode, RuntimeState* 
state) {
 Status ExecNode::prepare(RuntimeState* state) {
     DCHECK(_runtime_profile.get() != nullptr);
     _rows_returned_counter = ADD_COUNTER(_runtime_profile, "RowsReturned", 
TUnit::UNIT);
+    _projection_timer = ADD_TIMER(_runtime_profile, "ProjectionTime");
     _rows_returned_rate = runtime_profile()->add_derived_counter(
             ROW_THROUGHPUT_COUNTER, TUnit::UNIT_PER_SECOND,
             std::bind<int64_t>(&RuntimeProfile::units_per_second, 
_rows_returned_counter,
@@ -806,6 +807,7 @@ std::string ExecNode::get_name() {
 }
 
 Status ExecNode::do_projections(vectorized::Block* origin_block, 
vectorized::Block* output_block) {
+    SCOPED_TIMER(_projection_timer);
     using namespace vectorized;
     auto is_mem_reuse = output_block->mem_reuse();
     MutableBlock mutable_block =
@@ -833,8 +835,7 @@ Status ExecNode::do_projections(vectorized::Block* 
origin_block, vectorized::Blo
 }
 
 Status ExecNode::get_next_after_projects(RuntimeState* state, 
vectorized::Block* block, bool* eos) {
-    // delete the UNLIKELY after support new optimizers
-    if (UNLIKELY(_output_row_descriptor)) {
+    if (_output_row_descriptor) {
         
_origin_block.clear_column_data(_row_descriptor.num_materialized_slots());
         auto status = get_next(state, &_origin_block, eos);
         if (UNLIKELY(!status.ok())) return status;
diff --git a/be/src/exec/exec_node.h b/be/src/exec/exec_node.h
index 62a6a0ccae..1de8f921a8 100644
--- a/be/src/exec/exec_node.h
+++ b/be/src/exec/exec_node.h
@@ -306,6 +306,7 @@ protected:
     RuntimeProfile::Counter* _rows_returned_rate;
     // Account for peak memory used by this node
     RuntimeProfile::Counter* _memory_used_counter;
+    RuntimeProfile::Counter* _projection_timer;
 
     /// Since get_next is a frequent operation, it is not necessary to 
generate a span for each call
     /// to the get_next method. Therefore, the call of the get_next method in 
the ExecNode is
diff --git a/be/src/vec/exec/join/vjoin_node_base.cpp 
b/be/src/vec/exec/join/vjoin_node_base.cpp
index 3c06e694ab..59d433aca7 100644
--- a/be/src/vec/exec/join/vjoin_node_base.cpp
+++ b/be/src/vec/exec/join/vjoin_node_base.cpp
@@ -109,6 +109,7 @@ Status VJoinNodeBase::_build_output_block(Block* 
origin_block, Block* output_blo
             }
         } else {
             DCHECK(mutable_columns.size() == 
row_desc().num_materialized_slots());
+            SCOPED_TIMER(_projection_timer);
             for (int i = 0; i < mutable_columns.size(); ++i) {
                 auto result_column_id = -1;
                 RETURN_IF_ERROR(_output_expr_ctxs[i]->execute(origin_block, 
&result_column_id));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to