mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +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:
parent
01c9c88e79
commit
cb48ece77f
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user