| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2016 Google Inc. | 3 # Copyright 2016 Google Inc. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 from __future__ import print_function | 8 from __future__ import print_function |
| 9 from _adb import Adb | 9 from _adb import Adb |
| 10 from _benchresult import BenchResult | 10 from _benchresult import BenchResult |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 try: | 206 try: |
| 207 skpbench.execute(hardware) | 207 skpbench.execute(hardware) |
| 208 if skpbench.best_result: | 208 if skpbench.best_result: |
| 209 skpbench.best_result.print_values(config_suffix=FLAGS.suffix) | 209 skpbench.best_result.print_values(config_suffix=FLAGS.suffix) |
| 210 else: | 210 else: |
| 211 print("WARNING: no result for %s with config %s" % | 211 print("WARNING: no result for %s with config %s" % |
| 212 (skpbench.skp, skpbench.config), file=sys.stderr) | 212 (skpbench.skp, skpbench.config), file=sys.stderr) |
| 213 | 213 |
| 214 except StddevException: | 214 except StddevException: |
| 215 retry_max_stddev = skpbench.max_stddev * math.sqrt(2) | 215 retry_max_stddev = skpbench.max_stddev * math.sqrt(2) |
| 216 if FLAGS.verbosity >= 2: | 216 if FLAGS.verbosity >= 1: |
| 217 print("stddev is too high for %s/%s (%s%%, max=%.2f%%), " | 217 print("stddev is too high for %s/%s (%s%%, max=%.2f%%), " |
| 218 "re-queuing with max=%.2f%%." % | 218 "re-queuing with max=%.2f%%." % |
| 219 (skpbench.best_result.config, skpbench.best_result.bench, | 219 (skpbench.best_result.config, skpbench.best_result.bench, |
| 220 skpbench.best_result.stddev, skpbench.max_stddev, | 220 skpbench.best_result.stddev, skpbench.max_stddev, |
| 221 retry_max_stddev), | 221 retry_max_stddev), |
| 222 file=sys.stderr) | 222 file=sys.stderr) |
| 223 benches.append((skpbench.skp, skpbench.config, retry_max_stddev, | 223 benches.append((skpbench.skp, skpbench.config, retry_max_stddev, |
| 224 skpbench.best_result)) | 224 skpbench.best_result)) |
| 225 | 225 |
| 226 except HardwareException as exception: | 226 except HardwareException as exception: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 257 with hardware: | 257 with hardware: |
| 258 if hardware.kick_in_time: | 258 if hardware.kick_in_time: |
| 259 print("sleeping %i seconds to allow hardware settings to kick in..." % | 259 print("sleeping %i seconds to allow hardware settings to kick in..." % |
| 260 hardware.kick_in_time, file=sys.stderr) | 260 hardware.kick_in_time, file=sys.stderr) |
| 261 time.sleep(hardware.kick_in_time) | 261 time.sleep(hardware.kick_in_time) |
| 262 run_benchmarks(configs, skps, hardware) | 262 run_benchmarks(configs, skps, hardware) |
| 263 | 263 |
| 264 | 264 |
| 265 if __name__ == '__main__': | 265 if __name__ == '__main__': |
| 266 main() | 266 main() |
| OLD | NEW |