mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	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 <vincent.guittot@linaro.org>
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							120ea20ea0
						
					
				
				
					commit
					3c1369c268
				
			| @@ -49,7 +49,7 @@ class EnergyInstrumentBackend(Plugin): | |||||||
|     def validate_parameters(self, params): |     def validate_parameters(self, params): | ||||||
|         pass |         pass | ||||||
|  |  | ||||||
|     def get_instruments(self, target, **kwargs): |     def get_instruments(self, target, metadir, **kwargs): | ||||||
|         """ |         """ | ||||||
|         Get a dict mapping device keys to an Instruments |         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): |                         iio_capture, host, iio_devices, buffer_size): | ||||||
|  |  | ||||||
|         # |         # | ||||||
| @@ -298,7 +298,7 @@ class EnergyMeasurement(Instrument): | |||||||
|         self.backend.validate_parameters(self.params) |         self.backend.validate_parameters(self.params) | ||||||
|  |  | ||||||
|     def initialize(self, context): |     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(): |         for instrument in self.instruments.itervalues(): | ||||||
|             if not (instrument.mode & CONTINUOUS): |             if not (instrument.mode & CONTINUOUS): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user