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

Side by Side Diff: tools/perf/perf_tools/dromaeo.py

Issue 11363232: Telemetry: adds dromaeo dom and jslib benchmarks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/perf/page_sets/dromaeo_jslib.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from telemetry import multi_page_benchmark
6 from telemetry import util
7
8 class Dromaeo(multi_page_benchmark.MultiPageBenchmark):
9 def MeasurePage(self, page, tab, results):
10 js_is_done = """window.document.cookie.indexOf('__done=1') >= 0"""
tonyg 2012/11/21 18:05:35 This string should be singly quoted.
bulach 2012/11/21 19:55:10 Done.
11 def _IsDone():
12 return bool(tab.runtime.Evaluate(js_is_done))
13 util.WaitFor(_IsDone, 600, poll_interval=5)
14
15 js_get_results = """
16 window.automation.GetScore()
tonyg 2012/11/21 18:05:35 I think you need to get the individual results for
bulach 2012/11/21 19:55:10 Done.
17 """
tonyg 2012/11/21 18:05:35 This can be a single-line string.
bulach 2012/11/21 19:55:10 Done.
18 score = tab.runtime.Evaluate(js_get_results)
19 suffix = page.url[page.url.index('?') + 1 : page.url.index('&')]
20 results.Add('dromaeo_' + suffix, '', score)
OLDNEW
« no previous file with comments | « tools/perf/page_sets/dromaeo_jslib.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698