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

Unified Diff: tools/run_perf.py

Issue 1139833003: [test] Refactoring: Remove code duplication in perf runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index 501aacedbbc05fe8582a65349cd34662a5649231..b09d5b5ed596fcc53d453fe239368a071595eb7b 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -464,6 +464,10 @@ def FlattenRunnables(node, node_cb):
class Platform(object):
+ def __init__(self, options):
+ self.shell_dir = options.shell_dir
+ self.extra_flags = options.extra_flags.split()
+
@staticmethod
def GetPlatform(options):
if options.arch.startswith("android"):
@@ -474,8 +478,7 @@ class Platform(object):
class DesktopPlatform(Platform):
def __init__(self, options):
- self.shell_dir = options.shell_dir
- self.extra_flags = options.extra_flags.split()
+ super(DesktopPlatform, self).__init__(options)
def PreExecution(self):
pass
@@ -512,8 +515,7 @@ class AndroidPlatform(Platform): # pragma: no cover
DEVICE_DIR = "/data/local/tmp/v8/"
def __init__(self, options):
- self.shell_dir = options.shell_dir
- self.extra_flags = options.extra_flags.split()
+ super(AndroidPlatform, self).__init__(options)
LoadAndroidBuildTools(options.android_build_tools)
if not options.device:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698