log GPU usage on NEOS (#21440)

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 4f019cebc83e563ce8b104160d2c68975cfbea97
This commit is contained in:
Adeeb Shihadeh
2021-06-29 16:02:56 -07:00
committed by GitHub
parent e89adbdf7f
commit 5cb60b9211
+5 -1
View File
@@ -379,4 +379,8 @@ class Android(HardwareBase):
pass
def get_gpu_usage_percent(self):
return 0
try:
used, total = open('/sys/devices/soc/b00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/gpubusy').read().strip().split()
return 100.0 * int(used) / int(total)
except Exception:
return 0