mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	| @@ -35,6 +35,7 @@ import wlauto.common.android.resources | ||||
|  | ||||
| DELAY = 5 | ||||
|  | ||||
|  | ||||
| # Due to the way `super` works you have to call it at every level but WA executes some | ||||
| # methods conditionally and so has to do them directly via the class, this breaks super | ||||
| # and causes it to run things mutiple times ect. As a work around for this untill workloads | ||||
| @@ -221,7 +222,7 @@ class ApkWorkload(Workload): | ||||
|             self.check_apk_version() | ||||
|  | ||||
|         if self.launch_main: | ||||
|             self.launch_package() # launch default activity without intent data | ||||
|             self.launch_package()  # launch default activity without intent data | ||||
|         self.device.execute('am kill-all')  # kill all *background* activities | ||||
|         self.device.clear_logcat() | ||||
|  | ||||
|   | ||||
| @@ -224,18 +224,11 @@ class Param(object): | ||||
|         else: | ||||
|             new_value = current_value + [value] | ||||
|             setattr(obj, self.name, new_value) | ||||
|  | ||||
|     def validate(self, obj): | ||||
|         value = getattr(obj, self.name, None) | ||||
|         if value is not None: | ||||
|             if self.allowed_values: | ||||
|                 self._validate_allowed_values(obj, value) | ||||
|             if self.constraint: | ||||
|                 self._validate_constraint(obj, value) | ||||
|         else: | ||||
|             if self.mandatory: | ||||
|                 msg = 'No value specified for mandatory parameter {} in {}.' | ||||
|                 raise ConfigError(msg.format(self.name, obj.name)) | ||||
|  | ||||
|     def get_type_name(self): | ||||
|         typename = str(self.kind) | ||||
| @@ -567,7 +560,9 @@ class Extension(object): | ||||
|         if self.name is None: | ||||
|             raise ValidationError('Name not set for {}'.format(self._classname)) | ||||
|         for param in self.parameters: | ||||
|             param.validate(self) | ||||
|             if param.mandatory and getattr(self, param.name, None) is None: | ||||
|                 msg = 'No value specified for mandatory parameter {} in {}.' | ||||
|                 raise ConfigError(msg.format(param.name, self.name)) | ||||
|  | ||||
|     def initialize(self, context): | ||||
|         pass | ||||
|   | ||||
| @@ -682,7 +682,8 @@ def main(): | ||||
|     # pylint: disable=unbalanced-tuple-unpacking | ||||
|     logging.basicConfig(level=logging.INFO) | ||||
|     args = parse_arguments() | ||||
|     parallel_report, powerstate_report = report_power_stats( | ||||
|  | ||||
|     reports = report_power_stats( | ||||
|         trace_file=args.infile, | ||||
|         idle_state_names=args.idle_state_names, | ||||
|         core_names=args.core_names, | ||||
| @@ -696,6 +697,10 @@ def main(): | ||||
|         max_freq_list=args.max_freq_list, | ||||
|         start_marker_handling=args.start_marker_handling, | ||||
|     ) | ||||
|  | ||||
|     parallel_report = reports.pop(0) | ||||
|     powerstate_report = reports.pop(0) | ||||
|  | ||||
|     parallel_report.write(os.path.join(args.output_directory, 'parallel.csv')) | ||||
|     powerstate_report.write(os.path.join(args.output_directory, 'cpustate.csv')) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user