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

Side by Side Diff: tools/chrome_proxy/live_tests/network_metrics.py

Issue 1098253004: Move top_20 tests to a separate suite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing Header validation tests Created 5 years, 8 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.
sclittle 2015/04/24 18:55:22 Could this file be shared instead of duplicated? M
bustamante 2015/04/29 20:28:03 Yes, Done.
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 gzip 6 import gzip
7 import hashlib 7 import hashlib
8 import io 8 import io
9 import logging 9 import logging
10 import zlib 10 import zlib
11 11
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 if self.compute_data_saving: 198 if self.compute_data_saving:
199 if (original_content_length > 0 and 199 if (original_content_length > 0 and
200 original_content_length >= content_length): 200 original_content_length >= content_length):
201 saving = (float(original_content_length-content_length) * 100 / 201 saving = (float(original_content_length-content_length) * 100 /
202 original_content_length) 202 original_content_length)
203 results.AddValue(scalar.ScalarValue( 203 results.AddValue(scalar.ScalarValue(
204 results.current_page, 'data_saving', 'percent', saving)) 204 results.current_page, 'data_saving', 'percent', saving))
205 else: 205 else:
206 results.AddValue(scalar.ScalarValue( 206 results.AddValue(scalar.ScalarValue(
207 results.current_page, 'data_saving', 'percent', 0.0)) 207 results.current_page, 'data_saving', 'percent', 0.0))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698