MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / dump_stats

Method dump_stats

src/prof/src/jemalloc.rs:51–58  ·  view source on GitHub ↗
(&mut self, json_format: bool)

Source from the content-addressed store, hash-verified

49
50impl JemallocProfCtlExt for JemallocProfCtl {
51 fn dump_stats(&mut self, json_format: bool) -> anyhow::Result<String> {
52 // Try to avoid allocations within `stats_print`
53 let mut buf = Vec::with_capacity(1 << 22);
54 let mut options = tikv_jemalloc_ctl::stats_print::Options::default();
55 options.json_format = json_format;
56 tikv_jemalloc_ctl::stats_print::stats_print(&mut buf, options)?;
57 Ok(String::from_utf8(buf)?)
58 }
59
60 fn stats(&self) -> anyhow::Result<JemallocStats> {
61 JemallocStats::get()

Callers 1

handle_getFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected