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/02/19 06:54:46 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #2944: create pprof_profile_dir before heap profiling

imay commented on a change in pull request #2944: create pprof_profile_dir before heap profiling
URL: https://github.com/apache/incubator-doris/pull/2944#discussion_r381102021
 
 

 ##########
 File path: be/src/http/action/pprof_actions.cpp
 ##########
 @@ -243,23 +242,20 @@ void SymbolAction::handle(HttpRequest* req) {
 }
 
 Status PprofActions::setup(ExecEnv* exec_env, EvHttpServer* http_server) {
-    http_server->register_handler(HttpMethod::GET, "/pprof/heap",
-                                  new HeapAction());
-    http_server->register_handler(HttpMethod::GET, "/pprof/growth",
-                                  new GrowthAction());
-    http_server->register_handler(HttpMethod::GET, "/pprof/profile",
-                                  new ProfileAction());
-    http_server->register_handler(HttpMethod::GET, "/pprof/pmuprofile",
-                                  new PmuProfileAction());
-    http_server->register_handler(HttpMethod::GET, "/pprof/contention",
-                                  new ContentionAction());
-    http_server->register_handler(HttpMethod::GET, "/pprof/cmdline",
-                                  new CmdlineAction());
+    if (!config::pprof_profile_dir.empty())
+        boost::filesystem::create_directories(config::pprof_profile_dir);
 
 Review comment:
   1. better to use {} to enclose the operation
   2. better to use FileUtils instead of boost

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


With regards,
Apache Git Services

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