github-actions[bot] commented on code in PR #31367:
URL: https://github.com/apache/doris/pull/31367#discussion_r1501373566


##########
be/src/io/fs/file_system.h:
##########
@@ -19,8 +19,8 @@
 
 #include <butil/macros.h>

Review Comment:
   warning: 'butil/macros.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <butil/macros.h>
            ^
   ```
   



##########
be/src/pipeline/pipeline_fragment_context.h:
##########
@@ -19,13 +19,11 @@
 
 #include <gen_cpp/Types_types.h>

Review Comment:
   warning: 'gen_cpp/Types_types.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <gen_cpp/Types_types.h>
            ^
   ```
   



##########
be/src/pipeline/pipeline_tracing.h:
##########
@@ -0,0 +1,83 @@
+// 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 <concurrentqueue.h>
+#include <fmt/core.h>
+#include <gen_cpp/Types_types.h>
+#include <parallel_hashmap/phmap.h>
+
+#include <cstdint>
+#include <filesystem>
+
+#include "common/config.h"
+#include "util/hash_util.hpp" // IWYU pragma: keep
+#include "util/thrift_util.h"
+#include "util/time.h"
+
+namespace doris::pipeline {
+
+struct ScheduleRecord {
+    TUniqueId query_id;
+    std::string task_id;
+    uint32_t core_id;
+    uint64_t thread_id;
+    uint64_t start_time;
+    uint64_t end_time;
+    std::string state_name;
+
+    bool operator<(const ScheduleRecord& rhs) const { return start_time < 
rhs.start_time; }
+    std::string to_string(uint64_t append_value) const {
+        return fmt::format("{}|{}|{}|{}|{}|{}|{}|{}\n", 
doris::to_string(query_id), task_id,
+                           core_id, thread_id, start_time, end_time, 
state_name, append_value);
+    }
+};
+
+// all tracing datas of ONE specific query
+using OneQueryTraces = moodycamel::ConcurrentQueue<ScheduleRecord>;
+
+// belongs to exec_env, for all query, if enable
+class PipelineTracerContext {
+public:
+    enum class RecordType {
+        None,     // disable
+        PerQuery, // record per query. one query one file.
+        Periodic  // record per times. one timeslice one file.
+    };
+    void record(ScheduleRecord record); // record one schedule record
+    void end_query(TUniqueId query_id,
+                   uint64_t task_group); // tell context this query is end. 
may leads to dump.
+    Status change_record_params(const std::map<std::string, std::string>& 
params);

Review Comment:
   warning: parameter 1 is const-qualified in the function declaration; 
const-qualification of parameters only has an effect in function definitions 
[readability-avoid-const-params-in-decls]
   
   ```suggestion
       Status change_record_params(std::map<std::string, std::string>& params);
   ```
   



##########
be/src/pipeline/pipeline_tracing.h:
##########
@@ -0,0 +1,83 @@
+// 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 <concurrentqueue.h>

Review Comment:
   warning: 'concurrentqueue.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <concurrentqueue.h>
            ^
   ```
   



##########
be/src/pipeline/pipeline.h:
##########
@@ -18,11 +18,11 @@
 #pragma once
 
 #include <glog/logging.h>

Review Comment:
   warning: 'glog/logging.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <glog/logging.h>
            ^
   ```
   



##########
be/src/common/compiler_util.h:
##########
@@ -49,3 +49,5 @@
 #define MAY_ALIAS __attribute__((__may_alias__))
 
 #define ALIGN_CACHE_LINE __attribute__((aligned(CACHE_LINE_SIZE)))
+
+#define PURE __attribute__((pure))

Review Comment:
   warning: macro is not used [clang-diagnostic-unused-macros]
   ```cpp
   #define PURE __attribute__((pure))
           ^
   ```
   



##########
be/src/util/thrift_util.h:
##########
@@ -17,26 +17,24 @@
 
 #pragma once
 
-#include <stdint.h>
-#include <string.h>
+#include <gen_cpp/DataSinks_types.h>

Review Comment:
   warning: 'gen_cpp/DataSinks_types.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <gen_cpp/DataSinks_types.h>
            ^
   ```
   



-- 
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

Reply via email to