mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
energy_model: cleanner error reporting.
This commit is contained in:
parent
3d8c384bb7
commit
bf8dc6642f
@ -563,7 +563,11 @@ class EnergyModelInstrument(Instrument):
|
|||||||
self.logger.warning(message)
|
self.logger.warning(message)
|
||||||
opps = {'big': self.big_opps, 'little': self.little_opps}
|
opps = {'big': self.big_opps, 'little': self.little_opps}
|
||||||
leakages = {'big': self.big_leakage, 'little': self.little_leakage}
|
leakages = {'big': self.big_leakage, 'little': self.little_leakage}
|
||||||
measured_cpus_table, cpus_table = get_cpus_power_table(freq_power_table, 'frequency', opps, leakages)
|
try:
|
||||||
|
measured_cpus_table, cpus_table = get_cpus_power_table(freq_power_table, 'frequency', opps, leakages)
|
||||||
|
except (ValueError, KeyError, IndexError) as e:
|
||||||
|
self.logger.error('Could not create cpu power tables: {}'.format(e))
|
||||||
|
return
|
||||||
measured_cpus_output = os.path.join(output_directory, MEASURED_CPUS_TABLE_FILE)
|
measured_cpus_output = os.path.join(output_directory, MEASURED_CPUS_TABLE_FILE)
|
||||||
with open(measured_cpus_output, 'w') as wfh:
|
with open(measured_cpus_output, 'w') as wfh:
|
||||||
measured_cpus_table.to_csv(wfh)
|
measured_cpus_table.to_csv(wfh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user