1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 02:01:16 +00:00

instruments/energy_measurement: Add a keep_raw parameter

Add a `keep_raw` parameter to control whether raw files should be
deleted during teardown.
This commit is contained in:
Marc Bonnici 2019-10-03 11:28:32 +01:00 committed by setrofim
parent 3bef4fc92d
commit e41aa3c967

View File

@ -144,7 +144,13 @@ class DAQBackend(EnergyInstrumentBackend):
connector on the DAQ (varies between DAQ models). The default connector on the DAQ (varies between DAQ models). The default
assumes DAQ 6363 and similar with AI channels on connectors assumes DAQ 6363 and similar with AI channels on connectors
0-7 and 16-23. 0-7 and 16-23.
""") """),
Parameter('keep_raw', kind=bool, default=False,
description="""
If set to ``True``, this will prevent the raw files obtained
from the device before processing from being deleted
(this is maily used for debugging).
"""),
] ]
instrument = DaqInstrument instrument = DaqInstrument
@ -189,6 +195,12 @@ class EnergyProbeBackend(EnergyInstrumentBackend):
description=""" description="""
Path to /dev entry for the energy probe (it should be /dev/ttyACMx) Path to /dev entry for the energy probe (it should be /dev/ttyACMx)
"""), """),
Parameter('keep_raw', kind=bool, default=False,
description="""
If set to ``True``, this will prevent the raw files obtained
from the device before processing from being deleted
(this is maily used for debugging).
"""),
] ]
instrument = EnergyProbeInstrument instrument = EnergyProbeInstrument
@ -224,6 +236,12 @@ class ArmEnergyProbeBackend(EnergyInstrumentBackend):
description=""" description="""
Path to config file of the AEP Path to config file of the AEP
"""), """),
Parameter('keep_raw', kind=bool, default=False,
description="""
If set to ``True``, this will prevent the raw files obtained
from the device before processing from being deleted
(this is maily used for debugging).
"""),
] ]
instrument = ArmEnergyProbeInstrument instrument = ArmEnergyProbeInstrument
@ -282,6 +300,12 @@ class AcmeCapeBackend(EnergyInstrumentBackend):
description=""" description="""
Size of the capture buffer (in KB). Size of the capture buffer (in KB).
"""), """),
Parameter('keep_raw', kind=bool, default=False,
description="""
If set to ``True``, this will prevent the raw files obtained
from the device before processing from being deleted
(this is maily used for debugging).
"""),
] ]
# pylint: disable=arguments-differ # pylint: disable=arguments-differ
@ -307,7 +331,7 @@ class AcmeCapeBackend(EnergyInstrumentBackend):
for iio_device in iio_devices: for iio_device in iio_devices:
ret[iio_device] = AcmeCapeInstrument( ret[iio_device] = AcmeCapeInstrument(
target, iio_capture=iio_capture, host=host, target, iio_capture=iio_capture, host=host,
iio_device=iio_device, buffer_size=buffer_size) iio_device=iio_device, buffer_size=buffer_size, keep_raw=keep_raw)
return ret return ret