diff options
author | tanzhang <tanzhang@google.com> | 2015-08-14 14:39:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-14 21:40:36 +0000 |
commit | 6147ff91624f0ff542bb01d7047b828703420f66 (patch) | |
tree | f41383f21837428d85274e2fa2682ea9982fbcce | |
parent | 22ad4e30a3133145f9038a2441318f81b64432af (diff) | |
download | chromium_src-6147ff91624f0ff542bb01d7047b828703420f66.zip chromium_src-6147ff91624f0ff542bb01d7047b828703420f66.tar.gz chromium_src-6147ff91624f0ff542bb01d7047b828703420f66.tar.bz2 |
Fixed the bug in calculating the request duration in live_tests and integration_tests of Flywheel.
BUG=520675
Review URL: https://codereview.chromium.org/1289083004
Cr-Commit-Position: refs/heads/master@{#343498}
-rw-r--r-- | tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py | 10 | ||||
-rw-r--r-- | tools/chrome_proxy/live_tests/chrome_proxy_metrics.py | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py index 0bc0f3a..669168f 100644 --- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py +++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py @@ -124,6 +124,16 @@ class ChromeProxyMetric(network_metrics.NetworkMetric): results.current_page, 'request_start', 'ms', request_start, important=False)) + response_start = (float(response_start) - navigation_start) + results.AddValue(scalar.ScalarValue( + results.current_page, 'response_start', 'ms', response_start, + important=False)) + + response_end = (float(response_end) - navigation_start) + results.AddValue(scalar.ScalarValue( + results.current_page, 'response_end', 'ms', response_end, + important=False)) + # Phase measurements in milliseconds. domain_lookup_duration = (float(domain_lookup_end) - domain_lookup_start) results.AddValue(scalar.ScalarValue( diff --git a/tools/chrome_proxy/live_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/live_tests/chrome_proxy_metrics.py index 79e4f50..e456a00 100644 --- a/tools/chrome_proxy/live_tests/chrome_proxy_metrics.py +++ b/tools/chrome_proxy/live_tests/chrome_proxy_metrics.py @@ -104,6 +104,16 @@ class ChromeProxyMetric(network_metrics.NetworkMetric): results.current_page, 'request_start', 'ms', request_start, important=False)) + response_start = (float(response_start) - navigation_start) + results.AddValue(scalar.ScalarValue( + results.current_page, 'response_start', 'ms', response_start, + important=False)) + + response_end = (float(response_end) - navigation_start) + results.AddValue(scalar.ScalarValue( + results.current_page, 'response_end', 'ms', response_end, + important=False)) + # Phase measurements in milliseconds. domain_lookup_duration = (float(domain_lookup_end) - domain_lookup_start) results.AddValue(scalar.ScalarValue( |