(&self)
| 120 | } |
| 121 | |
| 122 | fn privilege_status(&self) -> Option<PrivilegeStatus> { |
| 123 | if is_root_user() { |
| 124 | return Some(PrivilegeStatus::Satisfied { |
| 125 | detail: "running as root".to_string(), |
| 126 | }); |
| 127 | } |
| 128 | if has_delegated_bpf_token() { |
| 129 | return Some(PrivilegeStatus::Satisfied { |
| 130 | detail: "delegated BPF token".to_string(), |
| 131 | }); |
| 132 | } |
| 133 | if has_memtrack_capabilities() { |
| 134 | return Some(PrivilegeStatus::Satisfied { |
| 135 | detail: "capabilities granted".to_string(), |
| 136 | }); |
| 137 | } |
| 138 | Some(PrivilegeStatus::Missing { |
| 139 | message: "capabilities missing, run `codspeed setup --mode memory`".to_string(), |
| 140 | }) |
| 141 | } |
| 142 | |
| 143 | fn support_level(&self, system_info: &SystemInfo) -> ExecutorSupport { |
| 144 | match &system_info.os { |
nothing calls this directly
no test coverage detected