(
&self,
udid: &str,
foreground: Option<ForegroundProcess>,
)
| 182 | |
| 183 | impl PerformanceRegistry { |
| 184 | pub async fn list_processes( |
| 185 | &self, |
| 186 | udid: &str, |
| 187 | foreground: Option<ForegroundProcess>, |
| 188 | ) -> Result<Vec<PerformanceProcess>, AppError> { |
| 189 | let ps = list_ps_processes().await?; |
| 190 | let mut processes = app_processes_from_ps(udid, foreground.as_ref(), ps); |
| 191 | if let Some(foreground) = foreground.as_ref() { |
| 192 | ensure_foreground_process(&mut processes, foreground).await; |
| 193 | } |
| 194 | processes.sort_by_key(|process| (!process.is_foreground, process.process.clone())); |
| 195 | Ok(processes) |
| 196 | } |
| 197 | |
| 198 | pub async fn snapshot( |
| 199 | &self, |
no test coverage detected