refactor(app_api): extract perf telemetry into own submodule

Lift PerformanceCpuSnapshot struct + the Linux /proc/stat parsers
(parse_proc_stat_line / read_total_jiffies / collect_proc_stats) +
the performance_cpu_snapshot Tauri command (~110 LOC) out of
app_api/core.rs into app_api/perf.rs. Self-contained CPU-usage
telemetry; nothing else in app_api references the helpers.

This is the "telemetry" slice cucadmuh's plan called out for splitting
core.rs's mixed runtime/platform/snapshot concerns. Other slices
(cli-bridge, runtime-control, platform window/scrolling) can follow.

app_api/core.rs: 235 → 122 LOC. lib.rs registration unchanged —
performance_cpu_snapshot is re-exported through `pub(crate) use
perf::*` in app_api/mod.rs.
This commit is contained in:
Psychotoxical
2026-05-08 14:18:32 +02:00
parent 3b5bd3f1cc
commit b5ae0ccf28
3 changed files with 117 additions and 110 deletions
@@ -2,12 +2,14 @@ use super::*;
mod core;
mod navidrome;
mod perf;
mod remote;
mod integration;
mod analysis;
pub(crate) use core::*;
pub(crate) use navidrome::*;
pub(crate) use perf::*;
pub(crate) use remote::*;
pub(crate) use integration::*;
pub(crate) use analysis::*;