mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +03:00
Fix NPU stats
This commit is contained in:
parent
377b78af11
commit
2bc139d34c
@ -391,7 +391,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats.npu) {
|
if (stats?.npu) {
|
||||||
hasValidNpu = true;
|
hasValidNpu = true;
|
||||||
series[key].data.push({ x: statsIdx + 1, y: stats.npu });
|
series[key].data.push({ x: statsIdx + 1, y: stats.npu });
|
||||||
}
|
}
|
||||||
@ -399,6 +399,7 @@ export default function GeneralMetrics({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!hasValidNpu) {
|
if (!hasValidNpu) {
|
||||||
|
console.log(`returning blank`);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,8 +586,8 @@ export default function GeneralMetrics({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(statsHistory.length == 0 ||
|
{(statsHistory.length == 0 ||
|
||||||
statsHistory[0].gpu_usages ||
|
gpuSeries.length > 0 ||
|
||||||
statsHistory[0].npu_usages) && (
|
npuSeries.length > 0) && (
|
||||||
<>
|
<>
|
||||||
<div className="mt-4 flex items-center justify-between">
|
<div className="mt-4 flex items-center justify-between">
|
||||||
<div className="text-sm font-medium text-muted-foreground">
|
<div className="text-sm font-medium text-muted-foreground">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user