chaoyli commented on a change in pull request #4825: URL: https://github.com/apache/incubator-doris/pull/4825#discussion_r514874623
########## File path: be/src/exec/scan_node.cpp ########## @@ -23,45 +23,37 @@ namespace doris { const string ScanNode::_s_bytes_read_counter = "BytesRead"; const string ScanNode::_s_rows_read_counter = "RowsRead"; -const string ScanNode::_s_total_read_timer = "TotalRawReadTime(*)"; -const string ScanNode::_s_total_throughput_counter = "TotalReadThroughput"; const string ScanNode::_s_materialize_tuple_timer = "MaterializeTupleTime(*)"; -const string ScanNode::_s_per_read_thread_throughput_counter = - "PerReadThreadRawHdfsThroughput"; const string ScanNode::_s_num_disks_accessed_counter = "NumDiskAccess"; const string ScanNode::_s_scanner_thread_counters_prefix = "ScannerThreads"; const string ScanNode::_s_scanner_thread_total_wallclock_time = "ScannerThreadsTotalWallClockTime"; -const string ScanNode::_s_num_scanner_threads_started ="NumScannerThreadsStarted"; - Status ScanNode::prepare(RuntimeState* state) { + init_scan_profile(); RETURN_IF_ERROR(ExecNode::prepare(state)); - _scanner_thread_counters = - ADD_THREAD_COUNTERS(runtime_profile(), _s_scanner_thread_counters_prefix); _bytes_read_counter = - ADD_COUNTER(runtime_profile(), _s_bytes_read_counter, TUnit::BYTES); + ADD_COUNTER(_segment_profile, _s_bytes_read_counter, TUnit::BYTES); //TODO: The _rows_read_counter == RowsReturned counter in exec node, there is no need to keep both of them _rows_read_counter = - ADD_COUNTER(runtime_profile(), _s_rows_read_counter, TUnit::UNIT); - _read_timer = ADD_TIMER(runtime_profile(), _s_total_read_timer); + ADD_COUNTER(_scanner_profile, _s_rows_read_counter, TUnit::UNIT); #ifndef BE_TEST - _total_throughput_counter = runtime_profile()->add_rate_counter( - _s_total_throughput_counter, _bytes_read_counter); #endif _materialize_tuple_timer = ADD_CHILD_TIMER(runtime_profile(), _s_materialize_tuple_timer, _s_scanner_thread_total_wallclock_time); - _per_read_thread_throughput_counter = runtime_profile()->add_derived_counter( - _s_per_read_thread_throughput_counter, TUnit::BYTES_PER_SECOND, - boost::bind<int64_t>(&RuntimeProfile::units_per_second, - _bytes_read_counter, - _read_timer), - ""); _num_disks_accessed_counter = ADD_COUNTER(runtime_profile(), _s_num_disks_accessed_counter, TUnit::UNIT); return Status::OK(); } +void ScanNode::init_scan_profile() { + _scanner_profile.reset(new RuntimeProfile("OlapScanner")); Review comment: Where to show this _scanner_profile, it's not added into _runtime_profile ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org