summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-07-16 08:25:14 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-07-16 08:25:14 +0200
commitb3a9c59fb4add0606ae3b61c17d3fe07abc51250 (patch)
treeb5f29c185ecb2e72ee99f465cd8410c3fbc8f3b9
parent0315b3b951cbd547c428ce8bd17cfee63f3a45fd (diff)
Protolog: Handle NaN in cycles_enc
-rw-r--r--lib/data_parameters.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/data_parameters.py b/lib/data_parameters.py
index bbfb404..7cb875d 100644
--- a/lib/data_parameters.py
+++ b/lib/data_parameters.py
@@ -315,26 +315,38 @@ class Protolog:
val['energy_enc'] = int(val['cycles_enc'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_enc is NaN for {} -> {} -> {}'.format(arch, lib, key))
try:
val['energy_ser'] = int(val['cycles_ser'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_ser is NaN for {} -> {} -> {}'.format(arch, lib, key))
try:
val['energy_encser'] = int(val['cycles_encser'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_encser is NaN for {} -> {} -> {}'.format(arch, lib, key))
try:
val['energy_des'] = int(val['cycles_des'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_des is NaN for {} -> {} -> {}'.format(arch, lib, key))
try:
val['energy_dec'] = int(val['cycles_dec'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_dec is NaN for {} -> {} -> {}'.format(arch, lib, key))
try:
val['energy_desdec'] = int(val['cycles_desdec'] * cpu.get_power(cpu_conf) / cpu_conf['cpu_freq'] * 1e9)
except KeyError:
pass
+ except ValueError:
+ print('cycles_desdec is NaN for {} -> {} -> {}'.format(arch, lib, key))
if radio_conf_str:
radio_conf = utils.parse_conf_str(radio_conf_str)