mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-29 22:24:51 +00:00 
			
		
		
		
	Update add_metric calls to include units for performance timings
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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() ======') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user