feat(perf): explicit toggle for live thread-group CPU polling (#891)

* feat(perf): explicit toggle for live thread-group CPU polling

Replace implicit thread-group collection (section open / pin) with a persisted
checkbox so Linux /proc scans run only when the user opts in for diagnosis.

Fix IPC: pass includeThreadGroups (camelCase) so Tauri maps the flag to Rust;
reset the CPU baseline when the option changes so thread % deltas are valid.

* docs: CHANGELOG and credits for PR #891

* fix(perf): gate CHILD_RESCAN_EVERY to Linux/macOS only

Avoid dead_code warning on Windows where perf child-PID rescan is unused.
This commit is contained in:
cucadmuh
2026-05-29 19:18:21 +03:00
committed by GitHub
parent 9925771a86
commit 8ea0308dba
9 changed files with 96 additions and 28 deletions
-6
View File
@@ -8,7 +8,6 @@ import {
subscribePerfProbeFlags,
} from '../utils/perf/perfFlags';
import { hasAnyLiveMetricPollNeed, usePerfLiveOverlayPins } from '../utils/perf/perfOverlayPins';
import { syncPerfLiveThreadGroupsNeed } from '../utils/perf/perfLivePollSettings';
import { useSyncExternalStore } from 'react';
interface Result {
@@ -41,11 +40,6 @@ export function useSidebarPerfProbe(): Result {
useAnalysisPerfListener(needAnalysis);
useEffect(() => {
if (perfProbeOpen) return;
syncPerfLiveThreadGroupsNeed(false, livePins);
}, [perfProbeOpen, livePins]);
useEffect(() => {
setPerfProbeTelemetryActive(perfProbeOpen);
return () => setPerfProbeTelemetryActive(false);