(
entry: &crate::native::bridge::LogEntry,
pid: i32,
process_name: &str,
)
| 2128 | } |
| 2129 | |
| 2130 | fn performance_log_entry_matches( |
| 2131 | entry: &crate::native::bridge::LogEntry, |
| 2132 | pid: i32, |
| 2133 | process_name: &str, |
| 2134 | ) -> bool { |
| 2135 | let pid_matches = entry.pid.as_i64() == Some(pid as i64); |
| 2136 | let process_matches = !process_name.is_empty() && entry.process == process_name; |
| 2137 | if !pid_matches && !process_matches { |
| 2138 | return false; |
| 2139 | } |
| 2140 | let haystack = format!( |
| 2141 | "{} {} {} {}", |
| 2142 | entry.level, entry.subsystem, entry.category, entry.message |
| 2143 | ) |
| 2144 | .to_lowercase(); |
| 2145 | [ |
| 2146 | "abort", |
| 2147 | "crash", |
| 2148 | "exception", |
| 2149 | "exited", |
| 2150 | "jetsam", |
| 2151 | "killed", |
| 2152 | "signal", |
| 2153 | "terminat", |
| 2154 | ] |
| 2155 | .iter() |
| 2156 | .any(|needle| haystack.contains(needle)) |
| 2157 | } |
| 2158 | |
| 2159 | async fn boot_android_device(state: AppState, udid: String) -> Result<(), AppError> { |
| 2160 | run_android_action(state, move |android| { |
no test coverage detected