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

Unified Diff: tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py

Issue 1141923004: Update experiment test to only verify /exptest/... are bypassed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix punctuation in comment Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
index 793acebbaffca3671462151cea88d3c37c4d9f68..ec7bcd2e0468820c65f84b676448ff9be5d6f277 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py
@@ -261,10 +261,16 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
results.current_page, 'lo_fi_response', 'count', lo_fi_response_count))
super(ChromeProxyMetric, self).AddResults(tab, results)
- def AddResultsForBypass(self, tab, results):
+ def AddResultsForBypass(self, tab, results, url_pattern=""):
bypass_count = 0
+ skipped_count = 0
for resp in self.IterResponses(tab):
+ # Only check the url's that contain the specified pattern.
+ if url_pattern and url_pattern not in resp.response.url:
+ skipped_count += 1
+ continue
+
if resp.HasChromeProxyViaHeader():
r = resp.response
raise ChromeProxyMetricException, (
@@ -276,8 +282,11 @@ class ChromeProxyMetric(network_metrics.NetworkMetric):
raise ChromeProxyMetricException, (
'Expected at least one response to be bypassed, but zero such '
'responses were received.')
+
results.AddValue(scalar.ScalarValue(
results.current_page, 'bypass', 'count', bypass_count))
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'skipped', 'count', skipped_count))
def AddResultsForCorsBypass(self, tab, results):
eligible_response_count = 0
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698