MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / ShowMemPool

Method ShowMemPool

src/tablet/tablet_impl.cc:4110–4127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4108}
4109
4110void TabletImpl::ShowMemPool(RpcController* controller,
4111 const ::fedb::api::HttpRequest* request,
4112 ::fedb::api::HttpResponse* response,
4113 Closure* done) {
4114 brpc::ClosureGuard done_guard(done);
4115#ifdef TCMALLOC_ENABLE
4116 brpc::Controller* cntl = static_cast<brpc::Controller*>(controller);
4117 MallocExtension* tcmalloc = MallocExtension::instance();
4118 std::string stat;
4119 stat.resize(1024);
4120 char* buffer = reinterpret_cast<char*>(&(stat[0]));
4121 tcmalloc->GetStats(buffer, 1024);
4122 cntl->response_attachment().append(
4123 "<html><head><title>Mem Stat</title></head><body><pre>");
4124 cntl->response_attachment().append(stat);
4125 cntl->response_attachment().append("</pre></body></html>");
4126#endif
4127}
4128
4129void TabletImpl::CheckZkClient() {
4130 if (!zk_client_->IsConnected()) {

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected