mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +03:00
Simplify check
This commit is contained in:
parent
d44de4f73c
commit
dd4a7a8f1d
@ -408,8 +408,8 @@ export default function GeneralMetrics({
|
|||||||
// other processes stats
|
// other processes stats
|
||||||
|
|
||||||
const hardwareType = useMemo(() => {
|
const hardwareType = useMemo(() => {
|
||||||
const hasGpu = statsHistory[0]?.gpu_usages != undefined;
|
const hasGpu = gpuSeries.length > 0;
|
||||||
const hasNpu = statsHistory[0]?.npu_usages != undefined;
|
const hasNpu = npuSeries.length > 0;
|
||||||
|
|
||||||
if (hasGpu && !hasNpu) {
|
if (hasGpu && !hasNpu) {
|
||||||
return "GPUs";
|
return "GPUs";
|
||||||
@ -418,7 +418,7 @@ export default function GeneralMetrics({
|
|||||||
} else {
|
} else {
|
||||||
return "GPUs / NPUs";
|
return "GPUs / NPUs";
|
||||||
}
|
}
|
||||||
}, [statsHistory]);
|
}, [gpuSeries, npuSeries]);
|
||||||
|
|
||||||
const otherProcessCpuSeries = useMemo(() => {
|
const otherProcessCpuSeries = useMemo(() => {
|
||||||
if (!statsHistory) {
|
if (!statsHistory) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user