MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / parse_sysctl_value

Function parse_sysctl_value

src/executor/wall_time/profiler/linux_sysctl.rs:39–45  ·  view source on GitHub ↗
(output: &str)

Source from the content-addressed store, hash-verified

37
38#[cfg(any(test, target_os = "linux"))]
39fn parse_sysctl_value(output: &str) -> Result<i64> {
40 let (_, value) = output
41 .split_once('=')
42 .context("Couldn't find the value in sysctl output")?;
43
44 Ok(value.trim().parse::<i64>()?)
45}
46
47#[cfg(test)]
48mod tests {

Callers 1

sysctl_readFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected