mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Add api for tcmalloc
This commit is contained in:
parent
574ae58adc
commit
35a037cf05
8 changed files with 138 additions and 4 deletions
|
@ -1014,6 +1014,14 @@ srs_error_t SrsServer::http_handle()
|
|||
if ((err = http_api_mux->handle("error.srs.com/api/v1/tests/errors", new SrsGoApiError())) != srs_success) {
|
||||
return srs_error_wrap(err, "handle tests errors for error.srs.com");
|
||||
}
|
||||
|
||||
#ifdef SRS_AUTO_GPERF
|
||||
// The test api for get tcmalloc stats.
|
||||
// @see Memory Introspection in https://gperftools.github.io/gperftools/tcmalloc.html
|
||||
if ((err = http_api_mux->handle("/api/v1/tcmalloc", new SrsGoApiTcmalloc())) != srs_success) {
|
||||
return srs_error_wrap(err, "handle tests errors");
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: FIXME: for console.
|
||||
// TODO: FIXME: support reload.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue