fix : opening link 2
All checks were successful
release / build (push) Successful in 26s
release / verify-windows (push) Successful in 1m4s

This commit is contained in:
jeanotx32
2026-08-12 01:16:52 +02:00
parent a38baf9a88
commit 3bd4d5f2ba
4 changed files with 95 additions and 5 deletions

View File

@@ -102,7 +102,24 @@ export function AgentCard({
<Metric label="Disque libre" value={formatBytes(status.diskFreeBytes)} />
<Metric label="CPU OBS" value={formatPercent(status.cpuUsage)} />
<Metric label="FPS" value={status.fps ? status.fps.toFixed(0) : '—'} />
<Metric label="Frames perdues" value={String(status.droppedFrames ?? '—')} />
<Metric
label="Rendu"
value={
status.frameRenderTimeMs === undefined
? '—'
: `${status.frameRenderTimeMs.toFixed(1)} ms`
}
/>
<Metric
label="Perdu · rendu"
value={formatSkipped(status.renderSkippedFrames, status.renderTotalFrames)}
title="Composition de la scène trop lente : capture, définition, accélération 3D"
/>
<Metric
label="Perdu · encodage"
value={formatSkipped(status.droppedFrames, status.outputTotalFrames)}
title="Encodeur en retard : preset trop lourd ou CPU saturé"
/>
</div>
<div className="row">
@@ -260,15 +277,39 @@ function WatchStrip({
);
}
function Metric({ label, value, mono }: { label: string; value: string; mono?: boolean }) {
function Metric({
label,
value,
mono,
title,
}: {
label: string;
value: string;
mono?: boolean;
title?: string;
}) {
return (
<div className="metric">
<div className="metric" title={title}>
<span className="metric-label">{label}</span>
<span className={`metric-value${mono ? ' mono' : ''}`}>{value}</span>
</div>
);
}
/**
* Images perdues, en valeur absolue et en part du total.
*
* Les compteurs d'OBS cumulent depuis son lancement : « 4 200 » ne dit rien
* seul, « 4 200 (0,3 %) » dit que tout va bien, « 4 200 (38 %) » qu'il faut
* agir.
*/
function formatSkipped(skipped?: number, total?: number): string {
if (skipped === undefined) return '—';
if (!total) return String(skipped);
const share = (skipped / total) * 100;
return `${skipped} (${share < 0.1 && skipped > 0 ? '<0,1' : share.toFixed(1).replace('.', ',')} %)`;
}
function basename(filePath: string): string {
const parts = filePath.split(/[\\/]/);
return parts[parts.length - 1] ?? filePath;