github-actions[bot] commented on code in PR #32013: URL: https://github.com/apache/doris/pull/32013#discussion_r1517597922
########## be/src/vec/exec/format/parquet/vparquet_reader.h: ########## @@ -211,7 +214,9 @@ class ParquetReader : public GenericReader { std::string _meta_cache_key(const std::string& path) { return "meta_" + path; } std::vector<io::PrefetchRange> _generate_random_access_ranges( const RowGroupReader::RowGroupIndex& group, size_t* avg_io_size); + void _collect_profile(); +private: Review Comment: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] ```suggestion ``` <details> <summary>Additional context</summary> **be/src/vec/exec/format/parquet/vparquet_reader.h:157:** previously declared here ```cpp private: ^ ``` </details> ########## be/src/vec/exec/format/table/table_format_reader.h: ########## @@ -57,6 +57,13 @@ class TableFormatReader : public GenericReader { virtual Status init_row_filters(const TFileRangeDesc& range) = 0; +protected: + void _collect_profile_before_close() override { + if (_file_format_reader != nullptr) { + _file_format_reader->collect_profile_before_close(); + } + } + protected: Review Comment: warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers] ```suggestion ``` <details> <summary>Additional context</summary> **be/src/vec/exec/format/table/table_format_reader.h:59:** previously declared here ```cpp protected: ^ ``` </details> ########## be/src/util/profile_collector.h: ########## @@ -0,0 +1,45 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#pragma once + +#include <atomic> + +namespace doris { + +class ProfileCollector { +public: + void collect_profile_at_runtime() { _collect_profile_at_runtime(); } + + void collect_profile_before_close() { + bool expected = false; + if (_collected.compare_exchange_strong(expected, true, std::memory_order_acq_rel)) { + _collect_profile_before_close(); + } + } + + virtual ~ProfileCollector() {} Review Comment: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] ```suggestion virtual ~ProfileCollector() = default; ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org 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