diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 211dd21..453884d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -3,7 +3,7 @@ windows_subsystem = "windows" )] -use sysinfo::{System, Pid}; +use sysinfo::System; use std::sync::Mutex; use std::process::Command; use tauri::State; @@ -164,7 +164,6 @@ fn get_syspulse_pids(self_pid: u32, sys: &System) -> HashSet { fn collect_snapshot( sys: &mut System, - self_pid: u32, syspulse_pids: &HashSet, pss_cache: &mut HashMap)>, collect_pss: bool @@ -357,7 +356,7 @@ fn get_system_stats(state: State, minimal: bool) -> SystemStats { // NO PSS collection during live dashboard. ONLY during profiling or after. // This is the primary cause of high CPU/I/O. - let snapshot = collect_snapshot(&mut sys, self_pid, &syspulse_pids, &mut pss_cache, profiling.is_active); + let snapshot = collect_snapshot(&mut sys, &syspulse_pids, &mut pss_cache, profiling.is_active); if profiling.is_active { profiling.snapshots.push(snapshot.clone()); @@ -450,7 +449,7 @@ fn main() { for i in 0..(cli.duration * 1000 / cli.interval) { let syspulse_pids = get_syspulse_pids(self_pid, &sys); - snapshots.push(collect_snapshot(&mut sys, self_pid, &syspulse_pids, &mut pss_cache, true)); + snapshots.push(collect_snapshot(&mut sys, &syspulse_pids, &mut pss_cache, true)); std::thread::sleep(Duration::from_millis(cli.interval)); if (i + 1) % (1000 / cli.interval) == 0 { println!(" Progress: {}/{}s", (i + 1) * cli.interval / 1000, cli.duration);