1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-13 22:28:36 +00:00

Update add_metric calls to include units for performance timings

This commit is contained in:
John Richardson 2016-05-19 11:07:27 +01:00
parent 0f7aff48cc
commit 4aee83abb7
4 changed files with 18 additions and 12 deletions

View File

@ -99,11 +99,11 @@ class Gmail(AndroidUiAutoBenchmark):
match = regex.search(line)
if match:
context.result.add_metric((match.group('key') + "_start"),
match.group('value1'))
match.group('value1'), units='ms')
context.result.add_metric((match.group('key') + "_finish"),
match.group('value2'))
match.group('value2'), units='ms')
context.result.add_metric((match.group('key') + "_duration"),
match.group('value3'))
match.group('value3'), units='ms')
def teardown(self, context):
super(Gmail, self).teardown(context)

View File

@ -100,9 +100,12 @@ class Googlephotos(AndroidUiAutoBenchmark):
for line in wfh:
match = regex.search(line)
if match:
context.result.add_metric((match.group('key') + "_start"), match.group('value1'))
context.result.add_metric((match.group('key') + "_finish"), match.group('value2'))
context.result.add_metric((match.group('key') + "_duration"), match.group('value3'))
context.result.add_metric((match.group('key') + "_start"),
match.group('value1'), units='ms')
context.result.add_metric((match.group('key') + "_finish"),
match.group('value2'), units='ms')
context.result.add_metric((match.group('key') + "_duration"),
match.group('value3'), units='ms')
def teardown(self, context):
super(Googlephotos, self).teardown(context)

View File

@ -100,11 +100,11 @@ class Reader(AndroidUiAutoBenchmark):
match = regex.search(line)
if match:
context.result.add_metric((match.group('key') + "_start"),
match.group('value1'))
match.group('value1'), units='ms')
context.result.add_metric((match.group('key') + "_finish"),
match.group('value2'))
match.group('value2'), units='ms')
context.result.add_metric((match.group('key') + "_duration"),
match.group('value3'))
match.group('value3'), units='ms')
def teardown(self, context):
super(Reader, self).teardown(context)

View File

@ -123,9 +123,12 @@ class Skype(AndroidUiAutoBenchmark):
for line in wfh:
match = regex.search(line)
if match:
context.result.add_metric((match.group('key') + "_start"), match.group('value1'))
context.result.add_metric((match.group('key') + "_finish"), match.group('value2'))
context.result.add_metric((match.group('key') + "_duration"), match.group('value3'))
context.result.add_metric((match.group('key') + "_start"),
match.group('value1'), units='ms')
context.result.add_metric((match.group('key') + "_finish"),
match.group('value2'), units='ms')
context.result.add_metric((match.group('key') + "_duration"),
match.group('value3'), units='ms')
def teardown(self, context):
self.logger.info('===== teardown() ======')