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

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

Issue 387753002: Update record_per_area to use results.AddValue(...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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
5 import time 5 import time
6 6
7 from measurements import smoothness 7 from measurements import smoothness
8 from telemetry.page import page_measurement 8 from telemetry.page import page_measurement
9 from telemetry.value import scalar
10
9 11
10 class RecordPerArea(page_measurement.PageMeasurement): 12 class RecordPerArea(page_measurement.PageMeasurement):
11 def __init__(self): 13 def __init__(self):
12 super(RecordPerArea, self).__init__('', True) 14 super(RecordPerArea, self).__init__('', True)
13 15
14 def AddCommandLineArgs(self, parser): 16 def AddCommandLineArgs(self, parser):
15 parser.add_option('--start-wait-time', type='float', 17 parser.add_option('--start-wait-time', type='float',
16 default=2, 18 default=2,
17 help='Wait time before the benchmark is started ' 19 help='Wait time before the benchmark is started '
18 '(must be long enought to load all content)') 20 '(must be long enought to load all content)')
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 52
51 tab.WaitForJavaScriptExpression('window.benchmark_results.done', 300) 53 tab.WaitForJavaScriptExpression('window.benchmark_results.done', 300)
52 54
53 all_data = tab.EvaluateJavaScript('window.benchmark_results.results') 55 all_data = tab.EvaluateJavaScript('window.benchmark_results.results')
54 for data in all_data: 56 for data in all_data:
55 width = data['width'] 57 width = data['width']
56 height = data['height'] 58 height = data['height']
57 area = width * height 59 area = width * height
58 time_ms = data['time_ms'] 60 time_ms = data['time_ms']
59 61
60 results.Add('area_%07d_%dx%d' % (area, width, height), 'ms', time_ms) 62 results.AddValue(scalar.ScalarValue(
61 63 results.current_page, 'area_%07d_%dx%d' % (area, width, height),
64 'ms', time_ms))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698