add spans for for jemalloc mallctl points
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5bf5afaec8
commit
dc6e9e74d9
1 changed files with 12 additions and 0 deletions
|
@ -335,6 +335,12 @@ where
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(
|
||||||
|
name = "get",
|
||||||
|
level = "trace"
|
||||||
|
skip_all,
|
||||||
|
fields(?key)
|
||||||
|
)]
|
||||||
fn get<T>(key: &Key) -> Result<T>
|
fn get<T>(key: &Key) -> Result<T>
|
||||||
where
|
where
|
||||||
T: Copy + Debug,
|
T: Copy + Debug,
|
||||||
|
@ -346,6 +352,12 @@ where
|
||||||
unsafe { mallctl::raw::read_mib(key.as_slice()) }.map_err(map_err)
|
unsafe { mallctl::raw::read_mib(key.as_slice()) }.map_err(map_err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tracing::instrument(
|
||||||
|
name = "xchg",
|
||||||
|
level = "trace"
|
||||||
|
skip_all,
|
||||||
|
fields(?key, ?val)
|
||||||
|
)]
|
||||||
fn xchg<T>(key: &Key, val: T) -> Result<T>
|
fn xchg<T>(key: &Key, val: T) -> Result<T>
|
||||||
where
|
where
|
||||||
T: Copy + Debug,
|
T: Copy + Debug,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue