You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/07/27 15:38:06 UTC

[incubator-doris] branch master updated: [Profile] Add transfer destinations detail to profile (#4161)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a2b53b8  [Profile] Add transfer destinations detail to profile (#4161)
a2b53b8 is described below

commit a2b53b8dddf7166bd56d538002b1bbdbf31c3f6a
Author: Zhengguo Yang <78...@qq.com>
AuthorDate: Mon Jul 27 23:37:50 2020 +0800

    [Profile] Add transfer destinations detail to profile (#4161)
    
    Add transfer destinations detail to profile
---
 be/src/runtime/data_stream_sender.cpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/data_stream_sender.cpp b/be/src/runtime/data_stream_sender.cpp
index a642e00..8c5d97b 100644
--- a/be/src/runtime/data_stream_sender.cpp
+++ b/be/src/runtime/data_stream_sender.cpp
@@ -128,6 +128,11 @@ public:
         return &_pb_batch;
     }
 
+    std::string get_fragment_instance_id_str() {
+        UniqueId uid(_fragment_instance_id);
+        return uid.to_string();
+    }
+
 private:
     inline Status _wait_last_brpc() {
         auto cntl = &_closure->cntl;
@@ -379,8 +384,17 @@ Status DataStreamSender::init(const TDataSink& tsink) {
 Status DataStreamSender::prepare(RuntimeState* state) {
     RETURN_IF_ERROR(DataSink::prepare(state));
     _state = state;
+    std::string instances;
+    for (const auto& channel : _channels) {
+        if (instances.empty()) {
+            instances = channel->get_fragment_instance_id_str();
+        } else {
+            instances += ", ";
+            instances += channel->get_fragment_instance_id_str();
+        }
+    }
     std::stringstream title;
-    title << "DataStreamSender (dst_id=" << _dest_node_id << ")";
+    title << "DataStreamSender (dst_id=" << _dest_node_id << ", dst_fragments=[" << instances << "])";
     _profile = _pool->add(new RuntimeProfile(title.str()));
     SCOPED_TIMER(_profile->total_time_counter());
     _mem_tracker.reset(


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