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

Unified Diff: tools/perf/benchmarks/blink_perf.py

Issue 19721002: [telemetry] Add run_benchmark benchmarks for everything that runs on the bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | tools/perf/benchmarks/dromaeo.py » ('j') | tools/perf/benchmarks/dromaeo.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/blink_perf.py
diff --git a/tools/perf/benchmarks/blink_perf.py b/tools/perf/benchmarks/blink_perf.py
new file mode 100644
index 0000000000000000000000000000000000000000..68b6dcd09e04cf1c7a0a3717939b6f6a6e68fe3c
--- /dev/null
+++ b/tools/perf/benchmarks/blink_perf.py
@@ -0,0 +1,61 @@
+# Copyright (c) 2013 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 telemetry import test
+from telemetry.core import util
+from telemetry.page import page_set
+
+from measurements import blink_perf
+
+
+def _CreatePageSetFromPath(path):
+ assert os.path.exists(path)
+
+ page_set_dict = {'pages': []}
+
+ def _AddPage(path):
tonyg 2013/07/18 01:39:00 I assume all this is duplicated with blink_perf.py
dtu 2013/07/18 02:17:05 Done.
+ if not path.endswith('.html'):
+ return
+ if '../' in open(path, 'r').read():
+ # If the page looks like it references its parent dir, include it.
+ page_set_dict['serving_dirs'] = [os.path.dirname(os.path.dirname(path))]
+ page_set_dict['pages'].append({'url':
+ 'file://' + path.replace('\\', '/')})
+
+ def _AddDir(dir_path, skipped):
+ for path in os.listdir(dir_path):
+ if path == 'resources':
+ continue
+ path = os.path.join(dir_path, path)
+ if path.startswith(tuple([os.path.join(path, s)
+ for s in skipped])):
+ continue
+ if os.path.isdir(path):
+ _AddDir(path, skipped)
+ else:
+ _AddPage(path)
+
+ if os.path.isdir(path):
+ skipped = []
+ skipped_file = os.path.join(path, 'Skipped')
+ if os.path.exists(skipped_file):
+ for line in open(skipped_file, 'r').readlines():
+ line = line.strip()
+ if line and not line.startswith('#'):
+ skipped.append(line.replace('/', os.sep))
+ _AddDir(path, skipped)
+ else:
+ _AddPage(path)
+ return page_set.PageSet.FromDict(page_set_dict, os.getcwd() + os.sep)
+
+
+class BlinkPerfAll(test.Test):
+ test = blink_perf.BlinkPerf
+
+ def CreatePageSet(self, options):
+ path = os.path.join(
+ util.GetChromiumSrcDir(), 'third_party', 'WebKit', 'PerformanceTests')
+ return _CreatePageSetFromPath(path)
« no previous file with comments | « no previous file | tools/perf/benchmarks/dromaeo.py » ('j') | tools/perf/benchmarks/dromaeo.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698