mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-01 07:32:13 +00:00 
			
		
		
		
	daq: fixing energy metric calculation
The summary energy metric was being calculated incorrectly. Instead of dividing power by the sampling rate, it was being multiplied by it and divided by a million for some reason.
This commit is contained in:
		| @@ -266,7 +266,7 @@ class Daq(Instrument): | ||||
|                     metric_name = '{}_{}'.format(port, metric) | ||||
|                     context.result.add_metric(metric_name, round(value, 3), UNITS[metric]) | ||||
|                     self._results[key][metric_name] = round(value, 3) | ||||
|                 energy = sum(data[metrics.index('power')]) * (self.sampling_rate / 1000000) | ||||
|                 energy = sum(data[metrics.index('power')]) / self.sampling_rate | ||||
|                 context.result.add_metric('{}_energy'.format(port), round(energy, 3), UNITS['energy']) | ||||
|  | ||||
|     def teardown(self, context): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user