mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-20 17:48:44 +00:00
Fix timing instrumentation logs for Skype and GooglePhotos
Bring both workloads in line with the standard way of regex searching the instrumentation logs.
This commit is contained in:
parent
60c94a79bd
commit
cbfcf6eaba
@ -74,19 +74,18 @@ class Googlephotos(AndroidUiAutoBenchmark):
|
|||||||
def update_result(self, context):
|
def update_result(self, context):
|
||||||
super(Googlephotos, self).update_result(context)
|
super(Googlephotos, self).update_result(context)
|
||||||
|
|
||||||
if self.dumpsys_enabled:
|
self.device.pull_file(self.output_file, context.output_directory)
|
||||||
self.device.pull_file(self.output_file, context.output_directory)
|
result_file = os.path.join(context.output_directory, self.instrumentation_log)
|
||||||
result_file = os.path.join(context.output_directory, self.instrumentation_log)
|
|
||||||
|
|
||||||
with open(result_file, 'r') as wfh:
|
with open(result_file, 'r') as wfh:
|
||||||
pattern = r'(?P<key>\w+)\s+(?P<value1>\d+)\s+(?P<value2>\d+)\s+(?P<value3>\d+)'
|
pattern = r'(?P<key>\w+)\s+(?P<value1>\d+)\s+(?P<value2>\d+)\s+(?P<value3>\d+)'
|
||||||
regex = re.compile(pattern)
|
regex = re.compile(pattern)
|
||||||
for line in wfh:
|
for line in wfh:
|
||||||
match = regex.search(line)
|
match = regex.search(line)
|
||||||
if match:
|
if match:
|
||||||
context.result.add_metric((match.group('key') + "_start"), match.group('value1'))
|
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') + "_finish"), match.group('value2'))
|
||||||
context.result.add_metric((match.group('key') + "_duration"), match.group('value3'))
|
context.result.add_metric((match.group('key') + "_duration"), match.group('value3'))
|
||||||
|
|
||||||
def teardown(self, context):
|
def teardown(self, context):
|
||||||
super(Googlephotos, self).teardown(context)
|
super(Googlephotos, self).teardown(context)
|
||||||
|
@ -117,14 +117,18 @@ class Skype(AndroidUiAutoBenchmark):
|
|||||||
|
|
||||||
# process results and add them using
|
# process results and add them using
|
||||||
# context.result.add_metric
|
# context.result.add_metric
|
||||||
with open(results_file, 'r') as wfh:
|
self.device.pull_file(self.output_file, context.output_directory)
|
||||||
regex = re.compile(r'(\w+)\s+(\d+)\s+(\d+)\s+(\d+)')
|
result_file = op.join(context.output_directory, self.instrumentation_log)
|
||||||
|
|
||||||
|
with open(result_file, 'r') as wfh:
|
||||||
|
pattern = r'(?P<key>\w+)\s+(?P<value1>\d+)\s+(?P<value2>\d+)\s+(?P<value3>\d+)'
|
||||||
|
regex = re.compile(pattern)
|
||||||
for line in wfh:
|
for line in wfh:
|
||||||
match = regex.search(line)
|
match = regex.search(line)
|
||||||
if match:
|
if match:
|
||||||
context.result.add_metric((match.group(1) + "_start"), match.group(2))
|
context.result.add_metric((match.group('key') + "_start"), match.group('value1'))
|
||||||
context.result.add_metric((match.group(1) + "_finish"), match.group(3))
|
context.result.add_metric((match.group('key') + "_finish"), match.group('value2'))
|
||||||
context.result.add_metric((match.group(1) + "_duration"), match.group(4))
|
context.result.add_metric((match.group('key') + "_duration"), match.group('value3'))
|
||||||
|
|
||||||
def teardown(self, context):
|
def teardown(self, context):
|
||||||
self.logger.info('===== teardown() ======')
|
self.logger.info('===== teardown() ======')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user