GreateCode commented on code in PR #2737:
URL: https://github.com/apache/brpc/pull/2737#discussion_r1744808688


##########
src/brpc/builtin/memory_service.cpp:
##########
@@ -58,6 +59,15 @@ static void get_tcmalloc_memory_info(butil::IOBuf& out) {
     os.move_to(out);
 }
 
+static void get_jemalloc_memory_info(Controller* cntl) {
+    const brpc::URI& uri = cntl->http_request().uri();
+    cntl->http_response().set_content_type("text/plain");
+    
+    const std::string* uri_opts = uri.GetQuery("opts");
+    std::string opts = !uri_opts || uri_opts->empty() ? "Ja" : *uri_opts;

Review Comment:
   可以的,不加就用默认的Ja。



-- 
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: dev-unsubscr...@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to