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:
cucadmuh
2026-05-31 02:55:34 +03:00
committed by GitHub
parent fc7964fb07
commit 77ecc8ddfe
2 changed files with 39 additions and 36 deletions
@@ -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