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

Method privilege_status

src/executor/memory/executor.rs:107–121  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

105 }
106
107 fn privilege_status(&self) -> Option<PrivilegeStatus> {
108 if is_root_user() {
109 return Some(PrivilegeStatus::Satisfied {
110 detail: "running as root".to_string(),
111 });
112 }
113 if has_memtrack_capabilities() {
114 return Some(PrivilegeStatus::Satisfied {
115 detail: "capabilities granted".to_string(),
116 });
117 }
118 Some(PrivilegeStatus::Missing {
119 message: "capabilities missing, run `codspeed setup --mode memory`".to_string(),
120 })
121 }
122
123 fn support_level(&self, system_info: &SystemInfo) -> ExecutorSupport {
124 match &system_info.os {

Callers

nothing calls this directly

Calls 2

is_root_userFunction · 0.85

Tested by

no test coverage detected