mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Remove GPU and RAM metrics (#105)
* Don't start metrics thread if not on linux * [Hardware] remove GPU/RAM metrics
This commit is contained in:
@@ -28,8 +28,8 @@ public class MetricsPublisher {
|
||||
private final HashMap<String, Double> metrics;
|
||||
private static final Logger logger = new Logger(MetricsPublisher.class, LogGroup.General);
|
||||
private static CPUMetrics cpuMetrics;
|
||||
private static GPUMetrics gpuMetrics;
|
||||
private static RAMMetrics ramMetrics;
|
||||
// private static GPUMetrics gpuMetrics;
|
||||
// private static RAMMetrics ramMetrics;
|
||||
|
||||
public static MetricsPublisher getInstance() {
|
||||
return Singleton.INSTANCE;
|
||||
@@ -37,8 +37,8 @@ public class MetricsPublisher {
|
||||
|
||||
private MetricsPublisher() {
|
||||
cpuMetrics = new CPUMetrics();
|
||||
gpuMetrics = new GPUMetrics();
|
||||
ramMetrics = new RAMMetrics();
|
||||
// gpuMetrics = new GPUMetrics();
|
||||
// ramMetrics = new RAMMetrics();
|
||||
|
||||
metrics = new HashMap<>();
|
||||
}
|
||||
@@ -51,9 +51,12 @@ public class MetricsPublisher {
|
||||
metrics.put("cpuTemp", cpuMetrics.getTemp());
|
||||
metrics.put("cpuUtil", cpuMetrics.getUtilization());
|
||||
metrics.put("cpuMem", cpuMetrics.getMemory());
|
||||
metrics.put("gpuTemp", gpuMetrics.getTemp());
|
||||
metrics.put("gpuMem", gpuMetrics.getMemory());
|
||||
metrics.put("ramUtil", ramMetrics.getUsedRam());
|
||||
/*Following metrics throw occasional errors and hence are commented out
|
||||
until a better solution for grabbing the metrics is found or patch for error is found.
|
||||
*/
|
||||
// metrics.put("gpuTemp", gpuMetrics.getTemp());
|
||||
// metrics.put("gpuMem", gpuMetrics.getMemory());
|
||||
// metrics.put("ramUtil", ramMetrics.getUsedRam());
|
||||
|
||||
DataChangeService.getInstance()
|
||||
.publishEvent(new OutgoingUIEvent<>("metrics", metrics));
|
||||
|
||||
Reference in New Issue
Block a user