Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobhan1 committed Feb 21, 2025
1 parent 48ea35b commit 4e7dcc1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion be/src/olap/olap_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ struct OlapReaderStatistics {
int64_t rows_del_by_bitmap = 0;
// the number of rows filtered by various column indexes.
int64_t rows_conditions_filtered = 0;
int64_t generate_row_ranges_ns = 0;
int64_t generate_row_ranges_by_keys_ns = 0;
int64_t generate_row_ranges_by_column_conditions_ns = 0;
int64_t generate_row_ranges_by_bf_ns = 0;
int64_t generate_row_ranges_by_zonemap_ns = 0;
int64_t generate_row_ranges_by_dict_ns = 0;
Expand Down
3 changes: 2 additions & 1 deletion be/src/olap/rowset/segment_v2/segment_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ Status SegmentIterator::_lazy_init() {
}

Status SegmentIterator::_get_row_ranges_by_keys() {
SCOPED_RAW_TIMER(&_opts.stats->generate_row_ranges_by_keys_ns);
DorisMetrics::instance()->segment_row_total->increment(num_rows());

// fast path for empty segment or empty key ranges
Expand Down Expand Up @@ -498,7 +499,7 @@ Status SegmentIterator::_prepare_seek(const StorageReadOptions::KeyRange& key_ra
}

Status SegmentIterator::_get_row_ranges_by_column_conditions() {
SCOPED_RAW_TIMER(&_opts.stats->generate_row_ranges_ns);
SCOPED_RAW_TIMER(&_opts.stats->generate_row_ranges_by_column_conditions_ns);
if (_row_bitmap.isEmpty()) {
return Status::OK();
}
Expand Down
5 changes: 4 additions & 1 deletion be/src/pipeline/exec/olap_scan_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ Status OlapScanLocalState::_init_profile() {
_block_init_timer = ADD_TIMER(_segment_profile, "BlockInitTime");
_block_init_seek_timer = ADD_TIMER(_segment_profile, "BlockInitSeekTime");
_block_init_seek_counter = ADD_COUNTER(_segment_profile, "BlockInitSeekCount", TUnit::UNIT);
_segment_generate_row_range_timer = ADD_TIMER(_segment_profile, "GenerateRowRangeTime");
_segment_generate_row_range_by_keys_timer =
ADD_TIMER(_segment_profile, "GenerateRowRangeByKeysTime");
_segment_generate_row_range_by_column_conditions_timer =
ADD_TIMER(_segment_profile, "GenerateRowRangeByColumnConditionsTime");
_segment_generate_row_range_by_bf_timer =
ADD_TIMER(_segment_profile, "GenerateRowRangeByBloomFilterIndexTime");
_collect_iterator_merge_next_timer = ADD_TIMER(_segment_profile, "CollectIteratorMergeTime");
Expand Down
3 changes: 2 additions & 1 deletion be/src/pipeline/exec/olap_scan_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ class OlapScanLocalState final : public ScanLocalState<OlapScanLocalState> {
RuntimeProfile::Counter* _block_init_timer = nullptr;
RuntimeProfile::Counter* _block_init_seek_timer = nullptr;
RuntimeProfile::Counter* _block_init_seek_counter = nullptr;
RuntimeProfile::Counter* _segment_generate_row_range_timer = nullptr;
RuntimeProfile::Counter* _segment_generate_row_range_by_keys_timer = nullptr;
RuntimeProfile::Counter* _segment_generate_row_range_by_column_conditions_timer = nullptr;
RuntimeProfile::Counter* _segment_generate_row_range_by_bf_timer = nullptr;
RuntimeProfile::Counter* _collect_iterator_merge_next_timer = nullptr;
RuntimeProfile::Counter* _segment_generate_row_range_by_zonemap_timer = nullptr;
Expand Down
5 changes: 4 additions & 1 deletion be/src/vec/exec/scan/new_olap_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,10 @@ void NewOlapScanner::_collect_profile_before_close() {
COUNTER_UPDATE(local_state->_block_init_timer, stats.block_init_ns);
COUNTER_UPDATE(local_state->_block_init_seek_timer, stats.block_init_seek_ns);
COUNTER_UPDATE(local_state->_block_init_seek_counter, stats.block_init_seek_num);
COUNTER_UPDATE(local_state->_segment_generate_row_range_timer, stats.generate_row_ranges_ns);
COUNTER_UPDATE(local_state->_segment_generate_row_range_by_keys_timer,
stats.generate_row_ranges_by_keys_ns);
COUNTER_UPDATE(local_state->_segment_generate_row_range_by_column_conditions_timer,
stats.generate_row_ranges_by_column_conditions_ns);
COUNTER_UPDATE(local_state->_segment_generate_row_range_by_bf_timer,
stats.generate_row_ranges_by_bf_ns);
COUNTER_UPDATE(local_state->_collect_iterator_merge_next_timer,
Expand Down

0 comments on commit 4e7dcc1

Please sign in to comment.