feat: add metrics publisher for NT (#1791)

Publishes metrics to NT using a protobuf under
`photonvision/coprocessors/metrics` using the device host name as the
key.

Refactors metrics to use numbers where possible, instead of strings.

Removes GPU mem display from metrics card when it can't be determined.

Updates UI metrics periodically.

Resolves #1988

Closes #830

---------

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
Sam Freund
2025-07-12 04:40:58 -05:00
committed by GitHub
parent d7e536dda9
commit 7f6edcd567
15 changed files with 383 additions and 117 deletions

View File

@@ -25,17 +25,17 @@ export interface ObjectDetectionModelProperties {
}
export interface MetricData {
cpuTemp?: string;
cpuUtil?: string;
cpuMem?: string;
gpuMem?: string;
ramUtil?: string;
gpuMemUtil?: string;
cpuTemp?: number;
cpuUtil?: number;
cpuThr?: string;
cpuUptime?: string;
diskUtilPct?: string;
npuUsage?: string;
ramMem?: number;
ramUtil?: number;
gpuMem?: number;
gpuMemUtil?: number;
diskUtilPct?: number;
npuUsage?: number[];
ipAddress?: string;
uptime?: number;
}
export enum NetworkConnectionType {