mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
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:
@@ -2,12 +2,15 @@ import {
|
||||
PERF_LIVE_POLL_MS_MAX,
|
||||
PERF_LIVE_POLL_MS_MIN,
|
||||
PERF_LIVE_POLL_MS_STEP,
|
||||
setPerfLiveIncludeThreadGroups,
|
||||
setPerfLivePollIntervalMs,
|
||||
usePerfLiveIncludeThreadGroups,
|
||||
usePerfLivePollIntervalMs,
|
||||
} from '../../../utils/perf/perfLivePollSettings';
|
||||
|
||||
export default function PerfLivePollControls() {
|
||||
const pollMs = usePerfLivePollIntervalMs();
|
||||
const includeThreadGroups = usePerfLiveIncludeThreadGroups();
|
||||
const pollSec = (pollMs / 1000).toFixed(1);
|
||||
|
||||
return (
|
||||
@@ -28,6 +31,19 @@ export default function PerfLivePollControls() {
|
||||
onChange={e => setPerfLivePollIntervalMs(Number(e.target.value))}
|
||||
/>
|
||||
</label>
|
||||
<label className="perf-live-poll__row perf-live-poll__row--check">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={includeThreadGroups}
|
||||
onChange={e => setPerfLiveIncludeThreadGroups(e.target.checked)}
|
||||
/>
|
||||
<span className="perf-live-poll__check-label">
|
||||
CPU by psysonic threads
|
||||
</span>
|
||||
</label>
|
||||
<p className="perf-live-poll__hint">
|
||||
Scans in-process thread groups each poll (Linux). Off by default — enable only while diagnosing.
|
||||
</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user