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/chrome_proxy/integration_tests/network_metrics_unittest.py

Issue 926833002: [Telemetry] Move gpu_timeline metrics to telemetry.web_perf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 base64 5 import base64
6 import unittest 6 import unittest
7 7
8 from integration_tests import network_metrics 8 from integration_tests import network_metrics
9 from metrics import test_page_test_results 9 from telemetry.unittest_util import test_page_test_results
10 from telemetry.timeline import event 10 from telemetry.timeline import event
11 11
12 12
13 HTML_BODY = """<!DOCTYPE HTML> 13 HTML_BODY = """<!DOCTYPE HTML>
14 <html> 14 <html>
15 <head> </head> 15 <head> </head>
16 <body> 16 <body>
17 <div id="test"> TEST HTML</div> 17 <div id="test"> TEST HTML</div>
18 </body> 18 </body>
19 </html>""" 19 </html>"""
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 cl = len(HTML_BODY) + GZIPPED_HTML_LEN + len(IMAGE_BODY) 167 cl = len(HTML_BODY) + GZIPPED_HTML_LEN + len(IMAGE_BODY)
168 results.AssertHasPageSpecificScalarValue('content_length', 'bytes', cl) 168 results.AssertHasPageSpecificScalarValue('content_length', 'bytes', cl)
169 169
170 ocl = len(HTML_BODY) + len(HTML_BODY) + IMAGE_OCL 170 ocl = len(HTML_BODY) + len(HTML_BODY) + IMAGE_OCL
171 results.AssertHasPageSpecificScalarValue( 171 results.AssertHasPageSpecificScalarValue(
172 'original_content_length', 'bytes', ocl) 172 'original_content_length', 'bytes', ocl)
173 173
174 saving_percent = float(ocl - cl) * 100/ ocl 174 saving_percent = float(ocl - cl) * 100/ ocl
175 results.AssertHasPageSpecificScalarValue( 175 results.AssertHasPageSpecificScalarValue(
176 'data_saving', 'percent', saving_percent) 176 'data_saving', 'percent', saving_percent)
OLDNEW
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_metrics_unittest.py ('k') | tools/perf/benchmarks/gpu_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698