mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
fix(perf): keep probe monitor metrics visible on Windows (#933)
Stop replacing the whole Monitor tab when CPU/RSS sampling is unsupported; show pipeline, UI rate, and analysis sections with an inline platform note. Also compute UI diagRates when the Rust snapshot returns supported: false.
This commit is contained in:
@@ -25,6 +25,7 @@ export default function SidebarPerfProbeMonitorTab() {
|
||||
const analysisPinned = usePipelineOverlayPinned('pipeline:analysis');
|
||||
const coverPinned = usePipelineOverlayPinned('pipeline:cover');
|
||||
const cpu = live.cpu;
|
||||
const cpuSupported = cpu?.supported === true;
|
||||
const collecting = live.collecting && cpu == null;
|
||||
const includeThreadGroups = usePerfLiveIncludeThreadGroups();
|
||||
const peakMemoryKbRef = useRef(1);
|
||||
@@ -51,14 +52,6 @@ export default function SidebarPerfProbeMonitorTab() {
|
||||
);
|
||||
}
|
||||
|
||||
if (cpu && !cpu.supported) {
|
||||
return (
|
||||
<div className="perf-monitor-empty">
|
||||
Live CPU/memory monitoring is unavailable on this platform or build.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const toggleLive = (id: PerfLiveOverlayPinId) => () => togglePerfLiveOverlayPin(id);
|
||||
const livePinned = (id: PerfLiveOverlayPinId) => livePins.has(id);
|
||||
|
||||
@@ -94,7 +87,13 @@ export default function SidebarPerfProbeMonitorTab() {
|
||||
/>
|
||||
</PerfProbeMetricSection>
|
||||
|
||||
{cpu && (
|
||||
{cpu && !cpuSupported && (
|
||||
<div className="perf-monitor-empty perf-monitor-empty--inline">
|
||||
Live CPU and RSS sampling is unavailable on this platform. Pipeline, UI rate, and analysis metrics below still work.
|
||||
</div>
|
||||
)}
|
||||
|
||||
{cpuSupported && cpu && (
|
||||
<>
|
||||
<PerfProbeMetricSection title="CPU — processes">
|
||||
<PerfProbeMetricCard
|
||||
|
||||
Reference in New Issue
Block a user