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 726e1c8c808 [opt](profile) add summary metric for file scanner #45941 
(#46188)
726e1c8c808 is described below

commit 726e1c8c80852719fb24e78000d5aa39d6ce5a45
Author: Mingyu Chen (Rayner) <morning...@163.com>
AuthorDate: Wed Jan 1 13:27:50 2025 +0800

    [opt](profile) add summary metric for file scanner #45941 (#46188)
    
    bp #45941
---
 be/src/vec/exec/scan/vfile_scanner.cpp | 74 +++++++++++++++++++---------------
 1 file changed, 41 insertions(+), 33 deletions(-)

diff --git a/be/src/vec/exec/scan/vfile_scanner.cpp 
b/be/src/vec/exec/scan/vfile_scanner.cpp
index 52701b1e184..f4376cc1e70 100644
--- a/be/src/vec/exec/scan/vfile_scanner.cpp
+++ b/be/src/vec/exec/scan/vfile_scanner.cpp
@@ -147,43 +147,51 @@ Status VFileScanner::prepare(
     _colname_to_value_range = colname_to_value_range;
     _col_name_to_slot_id = colname_to_slot_id;
     if (get_parent() != nullptr) {
-        _get_block_timer = ADD_TIMER(_parent->_scanner_profile, 
"FileScannerGetBlockTime");
-        _open_reader_timer = ADD_TIMER(_parent->_scanner_profile, 
"FileScannerOpenReaderTime");
-        _cast_to_input_block_timer =
-                ADD_TIMER(_parent->_scanner_profile, 
"FileScannerCastInputBlockTime");
-        _fill_path_columns_timer =
-                ADD_TIMER(_parent->_scanner_profile, 
"FileScannerFillPathColumnTime");
-        _fill_missing_columns_timer =
-                ADD_TIMER(_parent->_scanner_profile, 
"FileScannerFillMissingColumnTime");
-        _pre_filter_timer = ADD_TIMER(_parent->_scanner_profile, 
"FileScannerPreFilterTimer");
-        _convert_to_output_block_timer =
-                ADD_TIMER(_parent->_scanner_profile, 
"FileScannerConvertOuputBlockTime");
-        _empty_file_counter = ADD_COUNTER(_parent->_scanner_profile, 
"EmptyFileNum", TUnit::UNIT);
-        _not_found_file_counter =
-                ADD_COUNTER(_parent->_scanner_profile, "NotFoundFileNum", 
TUnit::UNIT);
-        _file_counter = ADD_COUNTER(_parent->_scanner_profile, "FileNumber", 
TUnit::UNIT);
-        _has_fully_rf_file_counter =
-                ADD_COUNTER(_parent->_scanner_profile, "HasFullyRfFileNumber", 
TUnit::UNIT);
-    } else {
-        _get_block_timer = ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerGetBlockTime");
+        _get_block_timer =
+                ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile, 
"FileScannerGetBlockTime", 1);
         _open_reader_timer =
-                ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerOpenReaderTime");
+                ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile, 
"FileScannerOpenReaderTime", 1);
         _cast_to_input_block_timer =
-                ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerCastInputBlockTime");
+                ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile, 
"FileScannerCastInputBlockTime", 1);
         _fill_path_columns_timer =
-                ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerFillPathColumnTime");
-        _fill_missing_columns_timer =
-                ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerFillMissingColumnTime");
-        _pre_filter_timer = ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerPreFilterTimer");
-        _convert_to_output_block_timer =
-                ADD_TIMER(_local_state->scanner_profile(), 
"FileScannerConvertOuputBlockTime");
+                ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile, 
"FileScannerFillPathColumnTime", 1);
+        _fill_missing_columns_timer = 
ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile,
+                                                           
"FileScannerFillMissingColumnTime", 1);
+        _pre_filter_timer =
+                ADD_TIMER_WITH_LEVEL(_parent->_scanner_profile, 
"FileScannerPreFilterTimer", 1);
+        _convert_to_output_block_timer = ADD_TIMER_WITH_LEVEL(
+                _parent->_scanner_profile, "FileScannerConvertOuputBlockTime", 
1);
         _empty_file_counter =
-                ADD_COUNTER(_local_state->scanner_profile(), "EmptyFileNum", 
TUnit::UNIT);
-        _not_found_file_counter =
-                ADD_COUNTER(_local_state->scanner_profile(), 
"NotFoundFileNum", TUnit::UNIT);
-        _file_counter = ADD_COUNTER(_local_state->scanner_profile(), 
"FileNumber", TUnit::UNIT);
-        _has_fully_rf_file_counter =
-                ADD_COUNTER(_local_state->scanner_profile(), 
"HasFullyRfFileNumber", TUnit::UNIT);
+                ADD_COUNTER_WITH_LEVEL(_parent->_scanner_profile, 
"EmptyFileNum", TUnit::UNIT, 1);
+        _not_found_file_counter = 
ADD_COUNTER_WITH_LEVEL(_parent->_scanner_profile,
+                                                         "NotFoundFileNum", 
TUnit::UNIT, 1);
+        _file_counter =
+                ADD_COUNTER_WITH_LEVEL(_parent->_scanner_profile, 
"FileNumber", TUnit::UNIT, 1);
+        _has_fully_rf_file_counter = 
ADD_COUNTER_WITH_LEVEL(_parent->_scanner_profile,
+                                                            
"HasFullyRfFileNumber", TUnit::UNIT, 1);
+    } else {
+        _get_block_timer =
+                ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(), 
"FileScannerGetBlockTime", 1);
+        _open_reader_timer = 
ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                  "FileScannerOpenReaderTime", 
1);
+        _cast_to_input_block_timer = 
ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                          
"FileScannerCastInputBlockTime", 1);
+        _fill_path_columns_timer = 
ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                        
"FileScannerFillPathColumnTime", 1);
+        _fill_missing_columns_timer = 
ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                           
"FileScannerFillMissingColumnTime", 1);
+        _pre_filter_timer = 
ADD_TIMER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                 "FileScannerPreFilterTimer", 
1);
+        _convert_to_output_block_timer = ADD_TIMER_WITH_LEVEL(
+                _local_state->scanner_profile(), 
"FileScannerConvertOuputBlockTime", 1);
+        _empty_file_counter = 
ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                     "EmptyFileNum", 
TUnit::UNIT, 1);
+        _not_found_file_counter = 
ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                         "NotFoundFileNum", 
TUnit::UNIT, 1);
+        _file_counter = 
ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(), "FileNumber",
+                                               TUnit::UNIT, 1);
+        _has_fully_rf_file_counter = 
ADD_COUNTER_WITH_LEVEL(_local_state->scanner_profile(),
+                                                            
"HasFullyRfFileNumber", TUnit::UNIT, 1);
     }
 
     _file_cache_statistics.reset(new io::FileCacheStatistics());


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

Reply via email to