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

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: Address Charlie's comments 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
« no previous file with comments | « tools/perf/contrib/blink_perf_cmdline/__init__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d146e162ee6f330ace66a7475afa52acbd18c6a3
--- /dev/null
+++ b/tools/perf/contrib/blink_perf_cmdline/blink_perf_cmdline.py
@@ -0,0 +1,32 @@
+# 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.
+import os
+
+from benchmarks import blink_perf
+
+
+# pylint: disable=protected-access
+class BlinkPerfAll(blink_perf._BlinkPerfBenchmark):
+
+ @classmethod
+ def Name(cls):
+ return 'blink_perf'
+
+ @classmethod
+ def AddBenchmarkCommandLineArgs(cls, parser):
+ parser.add_option('--test-path', type='string',
+ default=blink_perf.BLINK_PERF_BASE_DIR,
+ help=('Path to blink perf tests. Could be an absolute '
+ 'path, a relative path with respect to your '
+ 'current directory, or a relative path with '
+ 'respect to third_party/WebKit/PerformanceTest/)'))
+
+ def CreateStorySet(self, options):
+ if os.path.exists(options.test_path):
+ path = os.path.abspath(options.test_path)
+ else:
+ path = os.path.join(blink_perf.BLINK_PERF_BASE_DIR, options.test_path)
+ print
+ print 'Running all tests in %s' % path
+ return blink_perf.CreateStorySetFromPath(path, blink_perf.SKIPPED_FILE)
« no previous file with comments | « tools/perf/contrib/blink_perf_cmdline/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698