You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "liutang123 (via GitHub)" <gi...@apache.org> on 2023/04/13 14:31:15 UTC

[GitHub] [doris] liutang123 commented on a diff in pull request #18635: [improvement](executor) Priority Queue support vruntime

liutang123 commented on code in PR #18635:
URL: https://github.com/apache/doris/pull/18635#discussion_r1165616564


##########
be/src/pipeline/pipeline_task.h:
##########
@@ -174,14 +174,26 @@ class PipelineTask {
 
     std::string debug_string() const;
 
-    uint32_t total_schedule_time() const { return _schedule_time; }
-
     taskgroup::TaskGroup* get_task_group() const;
 
     void set_task_queue(TaskQueue* task_queue);
 
     static constexpr auto THREAD_TIME_SLICE = 100'000'000L;
 
+    // 1 used for update priority queue
+    // note(wb) a ugly implementation, need refactor later
+    // 1.1 pipeline task
+    void inc_runtime_ns(uint64_t delta_time) { this->_runtime += delta_time; }
+    uint64_t get_runtime_ns() { return this->_runtime; }
+
+    // 1.2 priority queue's queue level
+    void update_queue_level(int queue_level) { this->_queue_level = queue_level; }
+    int get_queue_level() const { return this->_queue_level; }
+
+    // 1.3 priority queue's core id
+    void set_core_id(int core_id) { this->_core_id = core_id; }
+    int get_core_id() const { return this->_core_id; }

Review Comment:
   `this` can be omitted.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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