mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
e672ea3faf
Devlib's ACME instrument uses iio-capture under the hood, which can only capture data from one IIO device at a time. Devlib's instrument API expects to produce a single CSV file for the Instrument, with a single axis of sample timestamps. These two things cannot be correctly reconciled without changing the devlib Instrument API - get_data would need to be able to return two distinct sets of data. Instead, where required WA will instantiate the ACME instrument multiple times (once for each IIO device), producing two separate CSV files. Aggregated energy info (as opposed to timestamped samples of energy data) _can_ be meaningfully combined from multiple IIO devices, so the derived stats are summed. This requires altering the internal API of the energy_measurement module - rather than a single instrument the super-instrument now has a dictionary mapping 'device' keys (this is really an arbitrary key, but I think that 'device' is a justifiable metaphor for whatever might separate multiple instruments, plus it is the terminology used by IIO/ACME) to Instrument objects. Existing instruments simply return a dict with a single entry, with None as the key. It may in future be possible to solve this problem in devlib's ACME instrument by avoiding the use of the iio-capture tool. In that case, it should be possible to basically revert this patch and get the required funcitonality from devlib.