mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Merge pull request #14 from jimboatarm/fudge
Fix timing instrumentation logs for Skype and GooglePhotos
This commit is contained in:
		| @@ -74,19 +74,18 @@ class Googlephotos(AndroidUiAutoBenchmark): | ||||
|     def update_result(self, context): | ||||
|         super(Googlephotos, self).update_result(context) | ||||
|  | ||||
|         if self.dumpsys_enabled: | ||||
|             self.device.pull_file(self.output_file, context.output_directory) | ||||
|             result_file = os.path.join(context.output_directory, self.instrumentation_log) | ||||
|         self.device.pull_file(self.output_file, context.output_directory) | ||||
|         result_file = os.path.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: | ||||
|                     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')) | ||||
|         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: | ||||
|                 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')) | ||||
|  | ||||
|     def teardown(self, context): | ||||
|         super(Googlephotos, self).teardown(context) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user