You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/07/16 06:10:41 UTC

[GitHub] [incubator-doris] WingsGo opened a new pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

WingsGo opened a new pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106


   ## Proposed changes
   Support display thread's stats in BE's website.Ref ISSUE: #4085 
   
   - add some methods to get thread's stats from Linux's system file in
   env.
   - support get thread's stats by http method.
   - register page handle in BE to show thread's stats to help developer position some thread relate problem.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have create an issue on [Doris's issues](https://github.com/apache/incubator-doris/issues), and have described the bug/feature there in detail
   - [x] Commit messages in my PR start with the related issues ID, like "#4071 Add pull request template to doris project"
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If this change need a document change, I have updated the document
   - [ ] Any dependent changes have been merged
   


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

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


[GitHub] [incubator-doris] WingsGo commented on pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
WingsGo commented on pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106#issuecomment-659182339


   The Page looks like
   
   ![Snip20200716_8](https://user-images.githubusercontent.com/22497357/87633635-49ff0080-c76e-11ea-8947-df0b2394cada.png)
   ![Snip20200716_9](https://user-images.githubusercontent.com/22497357/87633650-4e2b1e00-c76e-11ea-9bff-05c408d6484f.png)
   


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

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


[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
acelyc111 commented on a change in pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106#discussion_r455901517



##########
File path: be/src/util/thread.h
##########
@@ -18,27 +18,25 @@
 #ifndef DORIS_BE_SRC_UTIL_THREAD_H
 #define DORIS_BE_SRC_UTIL_THREAD_H
 
-#include <atomic>
 #include <pthread.h>
 #include <syscall.h>
 
+#include <atomic>
+
 #include "common/status.h"
 #include "gutil/ref_counted.h"
+#include "http/web_page_handler.h"

Review comment:
       Forward declare ‘ WebPageHandler’ and move this include to cpp




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

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


[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
acelyc111 commented on a change in pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106#discussion_r455894385



##########
File path: be/src/http/default_path_handlers.h
##########
@@ -20,6 +20,8 @@
 
 #include <stdio.h>
 
+#include "util/thread.h"

Review comment:
       You can move this include to cpp file to reduce includes in header files

##########
File path: be/src/env/env_util.cpp
##########
@@ -46,5 +47,59 @@ Status open_file_for_random(Env *env, const string &path, shared_ptr<RandomAcces
     return Status::OK();
 }
 
+static Status do_write_string_to_file(Env* env, const Slice& data,
+                                  const std::string& fname,

Review comment:
       indent




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

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


[GitHub] [incubator-doris] WingsGo commented on a change in pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
WingsGo commented on a change in pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106#discussion_r456184749



##########
File path: be/src/http/default_path_handlers.h
##########
@@ -20,6 +20,8 @@
 
 #include <stdio.h>
 
+#include "util/thread.h"

Review comment:
       ok, done




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

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


[GitHub] [incubator-doris] WingsGo commented on a change in pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
WingsGo commented on a change in pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106#discussion_r456184773



##########
File path: be/src/env/env_util.cpp
##########
@@ -46,5 +47,59 @@ Status open_file_for_random(Env *env, const string &path, shared_ptr<RandomAcces
     return Status::OK();
 }
 
+static Status do_write_string_to_file(Env* env, const Slice& data,
+                                  const std::string& fname,

Review comment:
       done




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

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


[GitHub] [incubator-doris] WingsGo closed pull request #4106: [Feature][ThreadPool]Add Web Page to display thread's stats

Posted by GitBox <gi...@apache.org>.
WingsGo closed pull request #4106:
URL: https://github.com/apache/incubator-doris/pull/4106


   


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

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