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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org