summaryrefslogtreecommitdiff
path: root/lib/data_parameters.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-05-09 08:07:20 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-05-09 08:07:20 +0200
commitb64016d8bb36afa750edf1637360001a84a2d309 (patch)
tree1a9382529128b458270667b6dbc410008860d8a9 /lib/data_parameters.py
parent8e547294b0fd4c8041f4ee61f0a01b3a84b9a97d (diff)
cycles_to_energy: Add get_power function
Diffstat (limited to 'lib/data_parameters.py')
-rw-r--r--lib/data_parameters.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/data_parameters.py b/lib/data_parameters.py
index ef463bc..e7a14b0 100644
--- a/lib/data_parameters.py
+++ b/lib/data_parameters.py
@@ -280,27 +280,27 @@ class Protolog:
for arch in self.aggregate[key].keys():
for lib, val in self.aggregate[key][arch].items():
try:
- val['energy_enc'] = int(val['cycles_enc'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_enc'] = int(val['cycles_enc'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
try:
- val['energy_ser'] = int(val['cycles_ser'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_ser'] = int(val['cycles_ser'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
try:
- val['energy_encser'] = int(val['cycles_encser'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_encser'] = int(val['cycles_encser'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
try:
- val['energy_des'] = int(val['cycles_des'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_des'] = int(val['cycles_des'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
try:
- val['energy_dec'] = int(val['cycles_dec'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_dec'] = int(val['cycles_dec'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
try:
- val['energy_desdec'] = int(val['cycles_desdec'] * cpu.get_current(cpu_conf) * cpu_conf['voltage'] / cpu_conf['cpu_freq'] * 1e9)
+ val['energy_desdec'] = int(val['cycles_desdec'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass