Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: tools/skpbench/skpbench.py

Issue 2481413003: skpbench: simplify adb and reduce number of invocations (Closed)
Patch Set: skpbench: simplify adb and reduce number of invocations Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skpbench/_hardware_pixel_c.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpbench/skpbench.py
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index 3e5b45138fc4e06001b8c87e7ba6c57ba510ba9f..fc5082b94ee60ea1aeb761bab6beee1b8f0ef83c 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -68,7 +68,7 @@ else:
import _os_path as _path
def dump_commandline_if_verbose(commandline):
- if FLAGS.verbosity >= 4:
+ if FLAGS.verbosity >= 5:
quoted = ['\'%s\'' % re.sub(r'([\\\'])', r'\\\1', x) for x in commandline]
print(' '.join(quoted), file=sys.stderr)
@@ -253,14 +253,14 @@ def run_benchmarks(configs, skps, hardware):
except HardwareException as exception:
skpbench.terminate()
- if FLAGS.verbosity >= 5:
+ if FLAGS.verbosity >= 4:
hardware.print_debug_diagnostics()
if FLAGS.verbosity >= 1:
print("%s; taking a %i second nap..." %
(exception.message, exception.sleeptime), file=sys.stderr)
benches.appendleft(benchargs) # retry the same bench next time.
hardware.sleep(exception.sleeptime)
- if FLAGS.verbosity >= 5:
+ if FLAGS.verbosity >= 4:
hardware.print_debug_diagnostics()
SKPBench.run_warmup(hardware.warmup_time)
@@ -272,8 +272,9 @@ def main():
skps = _path.find_skps(FLAGS.skps)
if FLAGS.adb:
- adb = Adb(FLAGS.device_serial)
- model = adb.get_device_model()
+ adb = Adb(FLAGS.device_serial,
+ echofile=(sys.stderr if FLAGS.verbosity >= 5 else None))
+ model = adb.check('getprop ro.product.model').strip()
if model == 'Pixel C':
from _hardware_pixel_c import HardwarePixelC
hardware = HardwarePixelC(adb)
« no previous file with comments | « tools/skpbench/_hardware_pixel_c.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698