apple
zeus.device.soc.apple
Apple Silicon SoC's.
MockZeusAppleSilicon
Mock class for zeus-apple-silicon library.
Source code in zeus/device/soc/apple.py
19 20 21 22 23 24 25 26 27 28 29 30 31 | |
__getattr__
__getattr__(name)
Raise an error if any method is called.
Since this class is only used when zeus-apple-silicon is not
available, something has gone wrong if any method is called.
Source code in zeus/device/soc/apple.py
22 23 24 25 26 27 28 29 30 31 | |
ZeusAppleInitError
Bases: ZeusSoCInitError
Import error for Apple SoC initialization failures.
Source code in zeus/device/soc/apple.py
47 48 49 50 51 52 | |
__init__
__init__(message)
Source code in zeus/device/soc/apple.py
50 51 52 | |
AppleSiliconMeasurement
dataclass
Bases: SoCMeasurement
Represents energy consumption of various subsystems on an Apple processor.
All measurements are in mJ.
Source code in zeus/device/soc/apple.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
__sub__
__sub__(other)
Produce a single measurement object containing differences across all fields.
Source code in zeus/device/soc/apple.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
zero_all_fields
zero_all_fields()
Set the value of all fields in the measurement object to zero.
Source code in zeus/device/soc/apple.py
105 106 107 108 109 110 111 112 113 114 115 | |
from_metrics
classmethod
from_metrics(metrics)
Return an AppleSiliconMeasurement object based on an AppleEnergyMetrics object.
Source code in zeus/device/soc/apple.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
AppleSilicon
Bases: SoC
An interface for obtaining energy metrics of an Apple processor.
Source code in zeus/device/soc/apple.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
__init__
__init__()
Source code in zeus/device/soc/apple.py
139 140 141 142 143 144 145 146 147 148 149 150 | |
get_available_metrics
get_available_metrics()
Return a set of all observable metrics on the current processor.
Source code in zeus/device/soc/apple.py
152 153 154 155 156 157 158 159 160 161 162 163 164 | |
get_total_energy_consumption
get_total_energy_consumption()
Returns the total energy consumption of the SoC.
The measurement should be cumulative; different calls to this function throughout
the lifetime of a single SoC manager object should count from a fixed arbitrary
point in time.
Units: mJ.
Source code in zeus/device/soc/apple.py
166 167 168 169 170 171 172 173 174 175 176 | |
begin_window
begin_window(key)
Begin a measurement interval labeled with key.
Source code in zeus/device/soc/apple.py
178 179 180 | |
end_window
end_window(key)
End a measurement window and return the energy consumption. Units: mJ.
Source code in zeus/device/soc/apple.py
182 183 184 185 | |
apple_silicon_is_available
cached
apple_silicon_is_available()
Check if Apple silicon is available.
Source code in zeus/device/soc/apple.py
37 38 39 40 41 42 43 44 | |