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

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

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4 from telemetry.core import util
5 from telemetry import multi_page_benchmark 5 from telemetry.page import multi_page_benchmark
6 from telemetry import util
7 6
8 class Octane(multi_page_benchmark.MultiPageBenchmark): 7 class Octane(multi_page_benchmark.MultiPageBenchmark):
9 def MeasurePage(self, _, tab, results): 8 def MeasurePage(self, _, tab, results):
10 js_is_done = """ 9 js_is_done = """
11 completed && !document.getElementById("progress-bar-container")""" 10 completed && !document.getElementById("progress-bar-container")"""
12 def _IsDone(): 11 def _IsDone():
13 return bool(tab.EvaluateJavaScript(js_is_done)) 12 return bool(tab.EvaluateJavaScript(js_is_done))
14 util.WaitFor(_IsDone, 300, poll_interval=5) 13 util.WaitFor(_IsDone, 300, poll_interval=5)
15 14
16 js_get_results = """ 15 js_get_results = """
(...skipping 10 matching lines...) Expand all
27 JSON.stringify(results); 26 JSON.stringify(results);
28 """ 27 """
29 result_dict = eval(tab.EvaluateJavaScript(js_get_results)) 28 result_dict = eval(tab.EvaluateJavaScript(js_get_results))
30 for key, value in result_dict.iteritems(): 29 for key, value in result_dict.iteritems():
31 if value == '...': 30 if value == '...':
32 continue 31 continue
33 data_type = 'unimportant' 32 data_type = 'unimportant'
34 if key == 'score': 33 if key == 'score':
35 data_type = 'default' 34 data_type = 'default'
36 results.Add(key, 'score (bigger is better)', value, data_type=data_type) 35 results.Add(key, 'score (bigger is better)', value, data_type=data_type)
OLDNEW
« no previous file with comments | « tools/perf/perf_tools/memory_benchmark_unittest.py ('k') | tools/perf/perf_tools/page_cycler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698