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

Function sysctl_read

src/executor/wall_time/profiler/linux_sysctl.rs:31–36  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

29
30#[cfg(target_os = "linux")]
31fn sysctl_read(name: &str) -> Result<i64> {
32 let output = Command::new("sysctl").arg(name).output()?;
33 let output = String::from_utf8(output.stdout)?;
34
35 parse_sysctl_value(&output)
36}
37
38#[cfg(any(test, target_os = "linux"))]
39fn parse_sysctl_value(output: &str) -> Result<i64> {

Callers 1

ensure_sysctlFunction · 0.85

Calls 2

parse_sysctl_valueFunction · 0.85
argMethod · 0.80

Tested by

no test coverage detected