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

Unified Diff: tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py

Issue 2874653002: Add the local blink_perf benchmark that supports running any subdir of WebKit/PerformanceTest (Closed)
Patch Set: Created 3 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
Index: tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py
diff --git a/tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py b/tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e406f34c599d89fd9dbce7a5cb303f10732578a
--- /dev/null
+++ b/tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py
@@ -0,0 +1,26 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from benchmarks import blink_perf
+
+
+# pylint: disable=protected-access
+class BlinkPerfAll(blink_perf._BlinkPerfBenchmark):
+
+ @classmethod
+ def Name(cls):
+ return 'blink_perf'
+
+ @classmethod
+ def ProcessCommandLineArgs(cls, parser, args):
+ if len(args.positional_args) > 2:
+ parser.error('Too many arguments.')
Xianzhu 2017/05/10 02:55:37 1. Does it still support options like --browser, -
nednguyen 2017/05/10 17:23:42 1. Yes. 2. Good question. It could be hard to augm
Xianzhu 2017/05/10 18:01:28 Like charliea asked in https://codereview.chromium
nednguyen 2017/05/10 20:30:44 Done. There is no need for the other CL then.
+
+ def CreateStorySet(self, options):
+ if len(options.positional_args) > 1:
+ path = options.positional_args[1]
Xianzhu 2017/05/10 02:55:37 I think it would be more convenient if the path is
nednguyen 2017/05/10 17:23:42 whynotboth.gif? since the other way is good for co
Xianzhu 2017/05/10 18:01:28 Supporting both will be great :), just like run-we
nednguyen 2017/05/10 20:30:44 Done.
+ else:
+ path = blink_perf.BLINK_PERF_BASE_DIR
+ print 'Running all blink_perf tests. This will take a long time...'
+ return blink_perf.CreateStorySetFromPath(path, blink_perf.SKIPPED_FILE)

Powered by Google App Engine
This is Rietveld 408576698