From 05e90bd623becf9ceae0de761f9d70e833e50a6d Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 5 Oct 2017 17:52:36 +0100 Subject: [PATCH] instrumentation/misc: fix interrupts instrument When porting from WA2 interrupt instrument retained references to "device" instead of "target". --- wa/instrumentation/misc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wa/instrumentation/misc.py b/wa/instrumentation/misc.py index a5e455b9..776c712e 100644 --- a/wa/instrumentation/misc.py +++ b/wa/instrumentation/misc.py @@ -256,8 +256,8 @@ class InterruptStatsInstrument(Instrument): """ - def __init__(self, device, **kwargs): - super(InterruptStatsInstrument, self).__init__(device, **kwargs) + def __init__(self, target, **kwargs): + super(InterruptStatsInstrument, self).__init__(target, **kwargs) self.before_file = None self.after_file = None self.diff_file = None @@ -269,11 +269,11 @@ class InterruptStatsInstrument(Instrument): def start(self, context): 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): 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): # If workload execution failed, the after_file may not have been created.