mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +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: [] };
|
||||
}
|
||||
|
||||
if (stats.npu) {
|
||||
if (stats?.npu) {
|
||||
hasValidNpu = true;
|
||||
series[key].data.push({ x: statsIdx + 1, y: stats.npu });
|
||||
}
|
||||
@ -399,6 +399,7 @@ export default function GeneralMetrics({
|
||||
});
|
||||
|
||||
if (!hasValidNpu) {
|
||||
console.log(`returning blank`);
|
||||
return [];
|
||||
}
|
||||
|
||||
@ -585,8 +586,8 @@ export default function GeneralMetrics({
|
||||
</div>
|
||||
|
||||
{(statsHistory.length == 0 ||
|
||||
statsHistory[0].gpu_usages ||
|
||||
statsHistory[0].npu_usages) && (
|
||||
gpuSeries.length > 0 ||
|
||||
npuSeries.length > 0) && (
|
||||
<>
|
||||
<div className="mt-4 flex items-center justify-between">
|
||||
<div className="text-sm font-medium text-muted-foreground">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user