(self, runnable, count, secondary=False, post_process=True)
| 1002 | self.driver.push_file(bench_abs, resource, bench_rel) |
| 1003 | |
| 1004 | def _Run(self, runnable, count, secondary=False, post_process=True): |
| 1005 | target_dir = 'bin_secondary' if secondary else 'bin' |
| 1006 | self.driver.drop_ram_caches() |
| 1007 | |
| 1008 | # Relative path to benchmark directory. |
| 1009 | if runnable.path: |
| 1010 | bench_rel = os.path.normpath(os.path.join(*runnable.path)) |
| 1011 | else: |
| 1012 | bench_rel = '.' |
| 1013 | |
| 1014 | logcat_file = None |
| 1015 | if self.args.dump_logcats_to: |
| 1016 | runnable_name = '-'.join(runnable.graphs) |
| 1017 | logcat_file = os.path.join( |
| 1018 | self.args.dump_logcats_to, 'logcat-%s-#%d%s.log' % ( |
| 1019 | runnable_name, count + 1, '-secondary' if secondary else '')) |
| 1020 | logging.debug('Dumping logcat into %s', logcat_file) |
| 1021 | |
| 1022 | output = Output() |
| 1023 | output.start_time = time.time() |
| 1024 | try: |
| 1025 | if not self.is_dry_run: |
| 1026 | output.stdout = self.driver.run( |
| 1027 | target_dir=target_dir, |
| 1028 | binary=runnable.binary, |
| 1029 | args=runnable.GetCommandFlags(self.extra_flags), |
| 1030 | rel_path=bench_rel, |
| 1031 | timeout=runnable.timeout, |
| 1032 | logcat_file=logcat_file, |
| 1033 | ) |
| 1034 | except android.CommandFailedException as e: |
| 1035 | output.stdout = e.output |
| 1036 | output.exit_code = e.status |
| 1037 | except android.TimeoutException as e: |
| 1038 | output.stdout = e.output |
| 1039 | output.timed_out = True |
| 1040 | if runnable.process_size: |
| 1041 | output.stdout += 'MaxMemory: Unsupported' |
| 1042 | output.end_time = time.time() |
| 1043 | return output |
| 1044 | |
| 1045 | |
| 1046 | class CustomMachineConfiguration: |
nothing calls this directly
no test coverage detected