1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

instruments/interrupts: Add interrupt files as artifacts

Ensure that the interrupt files pulled and diffed from the device are
added as artifacts.
This commit is contained in:
Marc Bonnici 2019-07-10 15:44:44 +01:00
parent 47769cf28d
commit 31e08a6477

View File

@ -276,9 +276,15 @@ class InterruptStatsInstrument(Instrument):
wfh.write(self.target.execute('cat /proc/interrupts'))
def update_output(self, context):
context.add_artifact('interrupts [before]', self.before_file, kind='data',
classifiers={'stage': 'before'})
# If workload execution failed, the after_file may not have been created.
if os.path.isfile(self.after_file):
diff_interrupt_files(self.before_file, self.after_file, _f(self.diff_file))
context.add_artifact('interrupts [after]', self.after_file, kind='data',
classifiers={'stage': 'after'})
context.add_artifact('interrupts [diff]', self.diff_file, kind='data',
classifiers={'stage': 'diff'})
class DynamicFrequencyInstrument(SysfsExtractor):