Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion asitop/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ def parse_cpu_metrics(powermetrics_parse):
#cpu_metric_dict["dram_W"] = cpu_metrics["dram_energy"]/1000
cpu_metric_dict["cpu_W"] = cpu_metrics["cpu_energy"]/1000
cpu_metric_dict["gpu_W"] = cpu_metrics["gpu_energy"]/1000
cpu_metric_dict["package_W"] = cpu_metrics["combined_power"]/1000
if "combined_power" in cpu_metrics.keys():
# macOS 13 Ventura
cpu_metric_dict["package_W"] = cpu_metrics["combined_power"]/1000
else:
# macOS 12 Monterey
cpu_metric_dict["package_W"] = cpu_metrics["package_energy"]/1000
return cpu_metric_dict


Expand Down