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

Side by Side Diff: tools/telemetry/telemetry/page/html_page_measurement_results_unittest.py

Issue 291153008: [Telemetry] Remove "_by_url" string from page-specific results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
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 import os 4 import os
5 import StringIO 5 import StringIO
6 import unittest 6 import unittest
7 7
8 from telemetry.page import html_page_measurement_results 8 from telemetry.page import html_page_measurement_results
9 from telemetry.page import page_set 9 from telemetry.page import page_set
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 "a": { 62 "a": {
63 "current": [3, 7], 63 "current": [3, 7],
64 "units": "seconds", 64 "units": "seconds",
65 "important": True 65 "important": True
66 }, 66 },
67 "telemetry_page_measurement_results.num_failed": { 67 "telemetry_page_measurement_results.num_failed": {
68 "current": [0], 68 "current": [0],
69 "units": "count", 69 "units": "count",
70 "important": False 70 "important": False
71 }, 71 },
72 "a_by_url.http://www.bar.com/": { 72 "a.http://www.bar.com/": {
73 "current": [7], 73 "current": [7],
74 "units": "seconds", 74 "units": "seconds",
75 "important": False 75 "important": False
76 }, 76 },
77 "telemetry_page_measurement_results.num_errored": { 77 "telemetry_page_measurement_results.num_errored": {
78 "current": [0], 78 "current": [0],
79 "units": "count", 79 "units": "count",
80 "important": False 80 "important": False
81 }, 81 },
82 "a_by_url.http://www.foo.com/": { 82 "a.http://www.foo.com/": {
83 "current": [3], 83 "current": [3],
84 "units": "seconds", 84 "units": "seconds",
85 "important": False 85 "important": False
86 } 86 }
87 } 87 }
88 } 88 }
89 }, 89 },
90 "revision": "revision" 90 "revision": "revision"
91 } 91 }
92 self.assertEquals(expected, results.GetResults()) 92 self.assertEquals(expected, results.GetResults())
(...skipping 24 matching lines...) Expand all
117 "a": { 117 "a": {
118 "current": [3, 7], 118 "current": [3, 7],
119 "units": "seconds", 119 "units": "seconds",
120 "important": True 120 "important": True
121 }, 121 },
122 "telemetry_page_measurement_results.num_failed": { 122 "telemetry_page_measurement_results.num_failed": {
123 "current": [0], 123 "current": [0],
124 "units": "count", 124 "units": "count",
125 "important": False 125 "important": False
126 }, 126 },
127 "a_by_url.http://www.bar.com/": { 127 "a.http://www.bar.com/": {
128 "current": [7], 128 "current": [7],
129 "units": "seconds", 129 "units": "seconds",
130 "important": False 130 "important": False
131 }, 131 },
132 "telemetry_page_measurement_results.num_errored": { 132 "telemetry_page_measurement_results.num_errored": {
133 "current": [0], 133 "current": [0],
134 "units": "count", 134 "units": "count",
135 "important": False 135 "important": False
136 }, 136 },
137 "a_by_url.http://www.foo.com/": { 137 "a.http://www.foo.com/": {
138 "current": [3], 138 "current": [3],
139 "units": "seconds", 139 "units": "seconds",
140 "important": False 140 "important": False
141 } 141 }
142 } 142 }
143 } 143 }
144 }, 144 },
145 "revision": "revision" 145 "revision": "revision"
146 }, 146 },
147 { 147 {
148 "platform": "browser_type", 148 "platform": "browser_type",
149 "buildTime": "build_time", 149 "buildTime": "build_time",
150 "label": None, 150 "label": None,
151 "tests": { 151 "tests": {
152 "test_name": { 152 "test_name": {
153 "metrics": { 153 "metrics": {
154 "a": { 154 "a": {
155 "current": [4, 8], 155 "current": [4, 8],
156 "units": "seconds", 156 "units": "seconds",
157 "important": True 157 "important": True
158 }, 158 },
159 "telemetry_page_measurement_results.num_failed": { 159 "telemetry_page_measurement_results.num_failed": {
160 "current": [0], 160 "current": [0],
161 "units": "count", 161 "units": "count",
162 "important": False, 162 "important": False,
163 }, 163 },
164 "a_by_url.http://www.bar.com/": { 164 "a.http://www.bar.com/": {
165 "current": [8], 165 "current": [8],
166 "units": "seconds", 166 "units": "seconds",
167 "important": False 167 "important": False
168 }, 168 },
169 "telemetry_page_measurement_results.num_errored": { 169 "telemetry_page_measurement_results.num_errored": {
170 "current": [0], 170 "current": [0],
171 "units": "count", 171 "units": "count",
172 "important": False 172 "important": False
173 }, 173 },
174 "a_by_url.http://www.foo.com/": { 174 "a.http://www.foo.com/": {
175 "current": [4], 175 "current": [4],
176 "units": "seconds", 176 "units": "seconds",
177 "important": False 177 "important": False
178 } 178 }
179 } 179 }
180 } 180 }
181 }, 181 },
182 "revision": "revision" 182 "revision": "revision"
183 }] 183 }]
184 self.assertEquals(expected, results.GetCombinedResults()) 184 self.assertEquals(expected, results.GetCombinedResults())
(...skipping 24 matching lines...) Expand all
209 "a": { 209 "a": {
210 "current": [5, 9], 210 "current": [5, 9],
211 "units": "seconds", 211 "units": "seconds",
212 "important": True 212 "important": True
213 }, 213 },
214 "telemetry_page_measurement_results.num_failed": { 214 "telemetry_page_measurement_results.num_failed": {
215 "current": [0], 215 "current": [0],
216 "units": "count", 216 "units": "count",
217 "important": False 217 "important": False
218 }, 218 },
219 "a_by_url.http://www.bar.com/": { 219 "a.http://www.bar.com/": {
220 "current": [9], 220 "current": [9],
221 "units": "seconds", 221 "units": "seconds",
222 "important": False 222 "important": False
223 }, 223 },
224 "telemetry_page_measurement_results.num_errored": { 224 "telemetry_page_measurement_results.num_errored": {
225 "current": [0], 225 "current": [0],
226 "units": "count", 226 "units": "count",
227 "important": False 227 "important": False
228 }, 228 },
229 "a_by_url.http://www.foo.com/": { 229 "a.http://www.foo.com/": {
230 "current": [5], 230 "current": [5],
231 "units": "seconds", 231 "units": "seconds",
232 "important": False 232 "important": False
233 } 233 }
234 } 234 }
235 } 235 }
236 }, 236 },
237 "revision": "revision" 237 "revision": "revision"
238 }] 238 }]
239 self.assertEquals(expected, results.GetCombinedResults()) 239 self.assertEquals(expected, results.GetCombinedResults())
240 self.assertTrue(len(output_file.getvalue()) < last_output_len) 240 self.assertTrue(len(output_file.getvalue()) < last_output_len)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698