Refactor Intel Stats (#22674)

* Improve Intel stats collection

* Update handling of stats to be simpler

* Simplify handling

* More accurately label Intel stats

* Cleanup

* Remove
This commit is contained in:
Nicolas Mowen
2026-03-29 12:09:02 -05:00
committed by GitHub
parent 29ca18c24c
commit 831cfc2444
8 changed files with 180 additions and 81 deletions
+6 -2
View File
@@ -39,8 +39,12 @@ class TestGpuStats(unittest.TestCase):
process.stdout = self.intel_results
sp.return_value = process
intel_stats = get_intel_gpu_stats(False)
print(f"the intel stats are {intel_stats}")
# rc6 values: 47.844741 and 100.0 → avg 73.92 → gpu = 100 - 73.92 = 26.08%
# Render/3D/0: 0.0 and 0.0 → enc = 0.0%
# Video/0: 4.533124 and 0.0 → dec = 2.27%
assert intel_stats == {
"gpu": "1.13%",
"gpu": "26.08%",
"mem": "-%",
"compute": "0.0%",
"dec": "2.27%",
}