From 3c1369c2689cdd765d3efac8629cdb3a54584fc4 Mon Sep 17 00:00:00 2001 From: Vincent Guittot Date: Fri, 16 Mar 2018 17:27:12 +0100 Subject: [PATCH] Add meta directory to get_instruments function energy instruments might need to save platform specific configurations in order to help to reproduce the use case. Such configuration should be saved in __meta directory. Add the directory path as a parameter of get_instruments() to save such informations Suggested-by: setrofim@gmail.com Signed-off-by: Vincent Guittot --- wa/instruments/energy_measurement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wa/instruments/energy_measurement.py b/wa/instruments/energy_measurement.py index 03d6f627..f171f7c0 100644 --- a/wa/instruments/energy_measurement.py +++ b/wa/instruments/energy_measurement.py @@ -49,7 +49,7 @@ class EnergyInstrumentBackend(Plugin): def validate_parameters(self, params): pass - def get_instruments(self, target, **kwargs): + def get_instruments(self, target, metadir, **kwargs): """ Get a dict mapping device keys to an Instruments @@ -187,7 +187,7 @@ class AcmeCapeBackend(EnergyInstrumentBackend): """), ] - def get_instruments(self, target, + def get_instruments(self, target, metadir, iio_capture, host, iio_devices, buffer_size): # @@ -298,7 +298,7 @@ class EnergyMeasurement(Instrument): self.backend.validate_parameters(self.params) def initialize(self, context): - self.instruments = self.backend.get_instruments(self.target, **self.params) + self.instruments = self.backend.get_instruments(self.target, context.run_output.metadir, **self.params) for instrument in self.instruments.itervalues(): if not (instrument.mode & CONTINUOUS):