MCPcopy Create free account
hub / github.com/apache/kvrocks / GetProfilingStatus

Method GetProfilingStatus

src/server/memory_profiler.cc:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86StatusOr<bool> MemoryProfiler::GetProfilingStatus() {
87#ifdef ENABLE_JEMALLOC
88 bool is_prof_enabled = false;
89 if (auto s = GetJemallocOption("opt.prof", &is_prof_enabled); !s.IsOK()) {
90 return s;
91 }
92 if (!is_prof_enabled) return false;
93
94 bool is_prof_active = false;
95 if (auto s = GetJemallocOption("prof.active", &is_prof_active); !s.IsOK()) {
96 return s;
97 }
98 return is_prof_active;
99#else
100 return {Status::NotOK, errProfilingUnsupported};
101#endif
102}
103
104Status MemoryProfiler::Dump(std::string_view dir) {
105#ifdef ENABLE_JEMALLOC

Callers 1

ExecuteMethod · 0.80

Calls 2

GetJemallocOptionFunction · 0.85
IsOKMethod · 0.45

Tested by

no test coverage detected