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

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

Issue 23455049: [telemetry] Make single-benchmark measurements protected and undiscoverable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update discover unit tests. Created 7 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/measurements/blink_perf.py ('k') | tools/telemetry/telemetry/core/discover.py » ('j') | 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.page import page_measurement
6
7 class Dromaeo(page_measurement.PageMeasurement):
8 def MeasurePage(self, page, tab, results):
9 tab.WaitForJavaScriptExpression(
10 'window.document.cookie.indexOf("__done=1") >= 0', 600)
11
12 js_get_results = 'JSON.stringify(window.automation.GetResults())'
13 print js_get_results
14 score = eval(tab.EvaluateJavaScript(js_get_results))
15
16 def Escape(k):
17 chars = [' ', '-', '/', '(', ')', '*']
18 for c in chars:
19 k = k.replace(c, '_')
20 return k
21
22 suffix = page.url[page.url.index('?') + 1 : page.url.index('&')]
23 for k, v in score.iteritems():
24 data_type = 'unimportant'
25 if k == suffix:
26 data_type = 'default'
27 results.Add(Escape(k), 'runs/s', v, data_type=data_type)
OLDNEW
« no previous file with comments | « tools/perf/measurements/blink_perf.py ('k') | tools/telemetry/telemetry/core/discover.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698