1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-22 18:48:38 +00:00

instrumentation/misc: fix interrupts instrument

When porting from WA2 interrupt instrument retained references to
"device" instead of "target".
This commit is contained in:
Sergei Trofimov 2017-10-05 17:52:36 +01:00
parent 0d54c5f070
commit 05e90bd623

View File

@ -256,8 +256,8 @@ class InterruptStatsInstrument(Instrument):
""" """
def __init__(self, device, **kwargs): def __init__(self, target, **kwargs):
super(InterruptStatsInstrument, self).__init__(device, **kwargs) super(InterruptStatsInstrument, self).__init__(target, **kwargs)
self.before_file = None self.before_file = None
self.after_file = None self.after_file = None
self.diff_file = None self.diff_file = None
@ -269,11 +269,11 @@ class InterruptStatsInstrument(Instrument):
def start(self, context): def start(self, context):
with open(_f(self.before_file), 'w') as wfh: with open(_f(self.before_file), 'w') as wfh:
wfh.write(self.device.execute('cat /proc/interrupts')) wfh.write(self.target.execute('cat /proc/interrupts'))
def stop(self, context): def stop(self, context):
with open(_f(self.after_file), 'w') as wfh: with open(_f(self.after_file), 'w') as wfh:
wfh.write(self.device.execute('cat /proc/interrupts')) wfh.write(self.target.execute('cat /proc/interrupts'))
def update_result(self, context): def update_result(self, context):
# If workload execution failed, the after_file may not have been created. # If workload execution failed, the after_file may not have been created.