MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / performance_log_entry_matches

Function performance_log_entry_matches

packages/server/src/api/routes.rs:2130–2157  ·  view source on GitHub ↗
(
    entry: &crate::native::bridge::LogEntry,
    pid: i32,
    process_name: &str,
)

Source from the content-addressed store, hash-verified

2128}
2129
2130fn 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
2159async fn boot_android_device(state: AppState, udid: String) -> Result<(), AppError> {
2160 run_android_action(state, move |android| {

Callers 1

performance_log_eventsFunction · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected