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

Method SetProfiling

src/server/memory_profiler.cc:74–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74Status MemoryProfiler::SetProfiling(bool enabled) {
75#ifdef ENABLE_JEMALLOC
76 if (auto s = CheckIfProfilingEnabled(); !s.IsOK()) {
77 return s;
78 }
79 return SetJemallocOption("prof.active", enabled);
80#else
81 (void)enabled;
82 return {Status::NotOK, errProfilingUnsupported};
83#endif
84}
85
86StatusOr<bool> MemoryProfiler::GetProfilingStatus() {
87#ifdef ENABLE_JEMALLOC

Callers 1

ExecuteMethod · 0.80

Calls 3

CheckIfProfilingEnabledFunction · 0.85
SetJemallocOptionFunction · 0.85
IsOKMethod · 0.45

Tested by

no test coverage detected