mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine api for tcmalloc
This commit is contained in:
parent
963720e1eb
commit
00810e6d1d
1 changed files with 9 additions and 0 deletions
|
@ -1779,6 +1779,7 @@ srs_error_t SrsGoApiTcmalloc::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
srs_error_t err = srs_success;
|
||||
|
||||
string page = r->query_get("page");
|
||||
srs_trace("query page=%s", page.c_str());
|
||||
|
||||
if (page == "summary") {
|
||||
char buffer[32 * 1024];
|
||||
|
@ -1800,6 +1801,14 @@ srs_error_t SrsGoApiTcmalloc::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
SrsJsonObject* data = SrsJsonAny::object();
|
||||
obj->set("data", data);
|
||||
|
||||
if (true) {
|
||||
SrsJsonObject* p = SrsJsonAny::object();
|
||||
data->set("query", p);
|
||||
|
||||
p->set("page", SrsJsonAny::str(page.c_str()));
|
||||
p->set("help", SrsJsonAny::str("?page=summary|detail"));
|
||||
}
|
||||
|
||||
size_t value = 0;
|
||||
|
||||
// @see https://gperftools.github.io/gperftools/tcmalloc.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue