Commit 54638d13 authored by Robert Ogden's avatar Robert Ogden Committed by Commit Bot

DRP Pingbacks: Remove main frame navigation timings

This basically turns out to a manual revert of
https://chromium-review.googlesource.com/c/chromium/src/+/1091499

Bug: 902063
Change-Id: I83a206ef53793f776fa04704f960dc44b4a158f1
Reviewed-on: https://chromium-review.googlesource.com/c/1324931Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606618}
parent f748ff79
......@@ -28,6 +28,7 @@
#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_pingback_client_impl.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
#include "components/data_reduction_proxy/core/browser/data_store.h"
......
......@@ -26,6 +26,7 @@ class NavigationHandle;
}
namespace data_reduction_proxy {
class DataReductionProxyData;
class DataReductionProxyIOData;
class DataStore;
}
......
......@@ -11,6 +11,7 @@
#include "base/test/metrics/histogram_tester.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
......
......@@ -167,25 +167,6 @@ void AddDataToPageloadMetrics(const DataReductionProxyData& request_data,
request->set_previews_type(PageloadMetrics_PreviewsType_NONE);
}
for (auto request_info_data : request_data.request_info()) {
RequestInfo* request_info = request->add_main_frame_network_request();
request_info->set_protocol(
protobuf_parser::ProtoRequestInfoProtocolFromRequestInfoProtocol(
request_info_data.protocol));
request_info->set_proxy_bypass(request_info_data.proxy_bypass);
request_info->set_allocated_dns_time(
protobuf_parser::CreateDurationFromTimeDelta(request_info_data.dns_time)
.release());
request_info->set_allocated_connect_time(
protobuf_parser::CreateDurationFromTimeDelta(
request_info_data.connect_time)
.release());
request_info->set_allocated_http_time(
protobuf_parser::CreateDurationFromTimeDelta(
request_info_data.http_time)
.release());
}
// Only report opt out information if a server preview was shown (otherwise,
// report opt out unknown). Similarly, if app background (Android) caused this
// report to be sent before the page load is terminated, do not report opt out
......
......@@ -58,19 +58,6 @@ static const int kCrashProcessId = 1;
static const int64_t kRendererMemory = 1024;
static const int64_t kTouchCount = 10;
static const int64_t kScrollCount = 20;
static const int kNumRequestInfo = 2;
static const DataReductionProxyData::RequestInfo first_request_info(
DataReductionProxyData::RequestInfo::Protocol::HTTP,
false,
base::TimeDelta::FromMilliseconds(1000),
base::TimeDelta::FromMilliseconds(1100),
base::TimeDelta::FromMilliseconds(1200));
static const DataReductionProxyData::RequestInfo second_request_info(
DataReductionProxyData::RequestInfo::Protocol::HTTPS,
true,
base::TimeDelta::FromMilliseconds(1300),
base::TimeDelta::FromMilliseconds(1400),
base::TimeDelta::FromMilliseconds(1500));
} // namespace
......@@ -197,8 +184,6 @@ class DataReductionProxyPingbackClientImplTest : public testing::Test {
request_data.set_client_lofi_requested(client_lofi_requested);
request_data.set_lite_page_received(lite_page_received);
request_data.set_page_id(page_id_);
request_data.add_request_info(first_request_info);
request_data.add_request_info(second_request_info);
static_cast<DataReductionProxyPingbackClient*>(pingback_client())
->SendPingback(request_data, *timing_);
page_id_++;
......@@ -325,37 +310,6 @@ TEST_F(DataReductionProxyPingbackClientImplTest, VerifyPingbackContent) {
EXPECT_EQ(kScrollCount, pageload_metrics.scroll_count());
EXPECT_EQ(kCachedFraction, pageload_metrics.cached_fraction());
EXPECT_EQ(data_page_id, pageload_metrics.page_id());
EXPECT_EQ(kNumRequestInfo,
pageload_metrics.main_frame_network_request_size());
EXPECT_EQ(protobuf_parser::ProtoRequestInfoProtocolFromRequestInfoProtocol(
first_request_info.protocol),
pageload_metrics.main_frame_network_request(0).protocol());
EXPECT_EQ(first_request_info.proxy_bypass,
pageload_metrics.main_frame_network_request(0).proxy_bypass());
EXPECT_EQ(first_request_info.dns_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).dns_time()));
EXPECT_EQ(first_request_info.connect_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).connect_time()));
EXPECT_EQ(first_request_info.http_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).http_time()));
EXPECT_EQ(protobuf_parser::ProtoRequestInfoProtocolFromRequestInfoProtocol(
second_request_info.protocol),
pageload_metrics.main_frame_network_request(1).protocol());
EXPECT_EQ(second_request_info.proxy_bypass,
pageload_metrics.main_frame_network_request(1).proxy_bypass());
EXPECT_EQ(second_request_info.dns_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).dns_time()));
EXPECT_EQ(second_request_info.connect_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).connect_time()));
EXPECT_EQ(second_request_info.http_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).http_time()));
EXPECT_EQ(PageloadMetrics_PreviewsType_NONE,
pageload_metrics.previews_type());
......@@ -496,39 +450,6 @@ TEST_F(DataReductionProxyPingbackClientImplTest,
EXPECT_EQ(kTouchCount, pageload_metrics.touch_count());
EXPECT_EQ(kScrollCount, pageload_metrics.scroll_count());
EXPECT_EQ(kCachedFraction, pageload_metrics.cached_fraction());
EXPECT_EQ(kNumRequestInfo,
pageload_metrics.main_frame_network_request_size());
EXPECT_EQ(protobuf_parser::ProtoRequestInfoProtocolFromRequestInfoProtocol(
first_request_info.protocol),
pageload_metrics.main_frame_network_request(0).protocol());
EXPECT_EQ(first_request_info.proxy_bypass,
pageload_metrics.main_frame_network_request(0).proxy_bypass());
EXPECT_EQ(first_request_info.dns_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).dns_time()));
EXPECT_EQ(
first_request_info.connect_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).connect_time()));
EXPECT_EQ(first_request_info.http_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(0).http_time()));
EXPECT_EQ(protobuf_parser::ProtoRequestInfoProtocolFromRequestInfoProtocol(
second_request_info.protocol),
pageload_metrics.main_frame_network_request(1).protocol());
EXPECT_EQ(second_request_info.proxy_bypass,
pageload_metrics.main_frame_network_request(1).proxy_bypass());
EXPECT_EQ(second_request_info.dns_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).dns_time()));
EXPECT_EQ(
second_request_info.connect_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).connect_time()));
EXPECT_EQ(second_request_info.http_time,
protobuf_parser::DurationToTimeDelta(
pageload_metrics.main_frame_network_request(1).http_time()));
EXPECT_EQ(page_ids.front(), pageload_metrics.page_id());
page_ids.pop_front();
......
......@@ -12,24 +12,6 @@ namespace data_reduction_proxy {
const void* const kDataReductionProxyUserDataKey =
&kDataReductionProxyUserDataKey;
DataReductionProxyData::RequestInfo::RequestInfo(Protocol protocol,
bool proxy_bypass,
base::TimeDelta dns_time,
base::TimeDelta connect_time,
base::TimeDelta http_time)
: protocol(protocol),
proxy_bypass(proxy_bypass),
dns_time(dns_time),
connect_time(connect_time),
http_time(http_time) {}
DataReductionProxyData::RequestInfo::RequestInfo(const RequestInfo& other)
: protocol(other.protocol),
proxy_bypass(other.proxy_bypass),
dns_time(other.dns_time),
connect_time(other.connect_time),
http_time(other.http_time) {}
DataReductionProxyData::DataReductionProxyData()
: used_data_reduction_proxy_(false),
client_lofi_requested_(false),
......@@ -39,8 +21,7 @@ DataReductionProxyData::DataReductionProxyData()
black_listed_(false),
was_cached_data_reduction_proxy_response_(false),
effective_connection_type_(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN),
connection_type_(net::NetworkChangeNotifier::CONNECTION_UNKNOWN),
request_info_(std::vector<DataReductionProxyData::RequestInfo>()) {}
connection_type_(net::NetworkChangeNotifier::CONNECTION_UNKNOWN) {}
DataReductionProxyData::~DataReductionProxyData() {}
......@@ -75,44 +56,4 @@ void DataReductionProxyData::ClearData(net::URLRequest* request) {
request->RemoveUserData(kDataReductionProxyUserDataKey);
}
std::vector<DataReductionProxyData::RequestInfo>
DataReductionProxyData::TakeRequestInfo() {
return std::move(request_info_);
}
std::unique_ptr<DataReductionProxyData::RequestInfo>
DataReductionProxyData::CreateRequestInfoFromRequest(net::URLRequest* request,
bool did_bypass_proxy) {
DCHECK(request);
auto timing_info = std::make_unique<net::LoadTimingInfo>();
request->GetLoadTimingInfo(timing_info.get());
if (timing_info) {
base::TimeDelta dns_time = timing_info->connect_timing.dns_end -
timing_info->connect_timing.dns_start;
base::TimeDelta connect_time = timing_info->connect_timing.connect_end -
timing_info->connect_timing.connect_start;
base::TimeDelta http_time =
timing_info->receive_headers_end - timing_info->send_start;
DataReductionProxyData::RequestInfo::Protocol protocol;
switch (request->proxy_server().scheme()) {
case net::ProxyServer::SCHEME_HTTP:
protocol = DataReductionProxyData::RequestInfo::Protocol::HTTP;
break;
case net::ProxyServer::SCHEME_HTTPS:
protocol = DataReductionProxyData::RequestInfo::Protocol::HTTPS;
break;
case net::ProxyServer::SCHEME_QUIC:
protocol = DataReductionProxyData::RequestInfo::Protocol::QUIC;
break;
default:
protocol = DataReductionProxyData::RequestInfo::Protocol::UNKNOWN;
break;
}
return std::make_unique<DataReductionProxyData::RequestInfo>(
protocol, did_bypass_proxy, dns_time, connect_time, http_time);
}
return nullptr;
}
} // namespace data_reduction_proxy
......@@ -13,7 +13,6 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/supports_user_data.h"
#include "base/time/time.h"
#include "net/base/network_change_notifier.h"
#include "net/nqe/effective_connection_type.h"
#include "url/gurl.h"
......@@ -28,37 +27,6 @@ namespace data_reduction_proxy {
// storage vehicles to associate this data with the object that owns it.
class DataReductionProxyData : public base::SupportsUserData::Data {
public:
// Holds connection timing data for each network request while loading the
// associated resource.
struct RequestInfo {
enum Protocol { HTTP, HTTPS, QUIC, UNKNOWN };
RequestInfo(Protocol protocol,
bool proxy_fallback,
base::TimeDelta dns_time,
base::TimeDelta connect_time,
base::TimeDelta http_time);
RequestInfo(const RequestInfo& other);
const Protocol protocol;
// If this request caused the proxy to fallback.
const bool proxy_bypass;
// See https://www.w3.org/TR/resource-timing/ for definitions.
const base::TimeDelta dns_time;
const base::TimeDelta connect_time;
const base::TimeDelta http_time;
// Used for testing.
bool operator==(const RequestInfo& other) const {
return protocol == other.protocol && proxy_bypass == other.proxy_bypass &&
dns_time == other.dns_time && connect_time == other.connect_time &&
http_time == other.http_time;
}
};
DataReductionProxyData();
~DataReductionProxyData() override;
......@@ -149,21 +117,6 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
bool black_listed() const { return black_listed_; }
void set_black_listed(bool black_listed) { black_listed_ = black_listed; }
// Holds connection timing data for each redirect while loading the associated
// resource.
std::vector<RequestInfo> request_info() const { return request_info_; }
void set_request_info(std::vector<RequestInfo> request_info) {
request_info_ = std::move(request_info);
}
// Adds an additional |RequestInfo| to the end of the list.
void add_request_info(const RequestInfo& info) {
request_info_.push_back(info);
}
// Passes ownership of |request_info_| to the caller so it can be preserved
// when |this| is deleted.
std::vector<RequestInfo> TakeRequestInfo();
// Removes |this| from |request|.
static void ClearData(net::URLRequest* request);
......@@ -175,12 +128,6 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
static DataReductionProxyData* GetDataAndCreateIfNecessary(
net::URLRequest* request);
// Given a URLRequest, pull out the necessary timing information and returns a
// fully populated |RequestInfo| struct.
static std::unique_ptr<RequestInfo> CreateRequestInfoFromRequest(
net::URLRequest* request,
bool did_bypass_proxy);
// Create a brand new instance of DataReductionProxyData that could be used in
// a different thread. Several of deep copies may occur per navigation, so
// this is inexpensive.
......@@ -233,10 +180,6 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
// data saver session. Only present on main frame requests.
base::Optional<uint64_t> page_id_;
// Lists the connection timing data for each network request while loading the
// main frame html. Used in PLM pingbacks.
std::vector<RequestInfo> request_info_;
DISALLOW_ASSIGN(DataReductionProxyData);
};
......
......@@ -78,25 +78,6 @@ TEST_F(DataReductionProxyDataTest, BasicSettersAndGetters) {
EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_WIFI,
data->connection_type());
EXPECT_EQ(std::vector<DataReductionProxyData::RequestInfo>(),
data->request_info());
DataReductionProxyData::RequestInfo request_info_1(
DataReductionProxyData::RequestInfo::Protocol::HTTP, false,
base::TimeDelta(), base::TimeDelta(), base::TimeDelta());
DataReductionProxyData::RequestInfo request_info_2(
DataReductionProxyData::RequestInfo::Protocol::HTTPS, true,
base::TimeDelta(), base::TimeDelta(), base::TimeDelta());
std::vector<DataReductionProxyData::RequestInfo> test_vector;
data->add_request_info(request_info_1);
test_vector.push_back(request_info_1);
EXPECT_EQ(test_vector, data->request_info());
data->add_request_info(request_info_2);
test_vector.push_back(request_info_2);
EXPECT_EQ(test_vector, data->request_info());
data->set_request_info(std::vector<DataReductionProxyData::RequestInfo>());
EXPECT_EQ(std::vector<DataReductionProxyData::RequestInfo>(),
data->request_info());
EXPECT_FALSE(data->page_id());
uint64_t page_id = 1;
data->set_page_id(page_id);
......@@ -142,10 +123,6 @@ TEST_F(DataReductionProxyDataTest, DeepCopy) {
for (size_t i = 0; i < arraysize(tests); ++i) {
static const char kSessionKey[] = "test-key";
static const GURL kTestURL("test-url");
std::vector<DataReductionProxyData::RequestInfo> request_info;
request_info.push_back(DataReductionProxyData::RequestInfo(
DataReductionProxyData::RequestInfo::Protocol::HTTP, false,
base::TimeDelta(), base::TimeDelta(), base::TimeDelta()));
std::unique_ptr<DataReductionProxyData> data(new DataReductionProxyData());
data->set_used_data_reduction_proxy(tests[i].data_reduction_used);
data->set_lite_page_received(tests[i].lofi_test_value);
......@@ -155,7 +132,6 @@ TEST_F(DataReductionProxyDataTest, DeepCopy) {
data->set_request_url(kTestURL);
data->set_effective_connection_type(net::EFFECTIVE_CONNECTION_TYPE_OFFLINE);
data->set_connection_type(net::NetworkChangeNotifier::CONNECTION_WIFI);
data->set_request_info(request_info);
data->set_page_id(2u);
std::unique_ptr<DataReductionProxyData> copy = data->DeepCopy();
EXPECT_EQ(tests[i].lofi_test_value, copy->lite_page_received());
......@@ -168,7 +144,6 @@ TEST_F(DataReductionProxyDataTest, DeepCopy) {
copy->effective_connection_type());
EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_WIFI,
copy->connection_type());
EXPECT_EQ(request_info, copy->request_info());
EXPECT_EQ(2u, data->page_id().value());
}
}
......
......@@ -7,7 +7,6 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_bypass_protocol.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
......@@ -168,14 +167,6 @@ DataReductionProxyInterceptor::MaybeInterceptResponseOrRedirect(
bypass_stats_->SetBypassType(bypass_type);
}
DataReductionProxyData* data = DataReductionProxyData::GetData(*request);
std::unique_ptr<DataReductionProxyData::RequestInfo> request_info =
DataReductionProxyData::CreateRequestInfoFromRequest(request,
should_retry);
if (data && request_info) {
data->add_request_info(*request_info.get());
}
if (!should_retry)
return nullptr;
// Returning non-NULL has the effect of restarting the request with the
......
......@@ -331,12 +331,6 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal(
data_reduction_proxy_request_options_->GetSecureSession()) {
page_id = data->page_id();
}
// Always persist data's |request_info| since it tracks connection pingback
// data for redirects on main frame requests. It should include re-issued
// requests and client redirects.
std::vector<DataReductionProxyData::RequestInfo> request_info;
if (data)
request_info = data->TakeRequestInfo();
// Reset |request|'s DataReductionProxyData.
DataReductionProxyData::ClearData(request);
......@@ -390,7 +384,6 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal(
page_id = data_reduction_proxy_request_options_->GeneratePageId();
}
data->set_page_id(page_id.value());
data->set_request_info(std::move(request_info));
}
}
......@@ -442,12 +435,6 @@ void DataReductionProxyNetworkDelegate::OnBeforeRedirectInternal(
page_id = data->page_id();
}
// Persist data's |request_info| since it tracks connection pingback data for
// redirects on main frame requests.
std::vector<DataReductionProxyData::RequestInfo> request_info;
if (data)
request_info = data->TakeRequestInfo();
DataReductionProxyData::ClearData(request);
if (page_id) {
......@@ -455,7 +442,6 @@ void DataReductionProxyNetworkDelegate::OnBeforeRedirectInternal(
data->set_page_id(page_id.value());
data->set_session_key(
data_reduction_proxy_request_options_->GetSecureSession());
data->set_request_info(std::move(request_info));
}
}
......
......@@ -1192,10 +1192,6 @@ TEST_F(DataReductionProxyNetworkDelegateTest, RedirectRequestDataCleared) {
&headers_original);
DataReductionProxyData* data = DataReductionProxyData::GetData(*request);
uint64_t original_page_id = data->page_id().value();
// Artificially add a RequestInfo for sake of testing that it is persisted.
data->add_request_info(DataReductionProxyData::RequestInfo(
DataReductionProxyData::RequestInfo::Protocol::HTTP, false,
base::TimeDelta(), base::TimeDelta(), base::TimeDelta()));
EXPECT_TRUE(data);
EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_OFFLINE,
......@@ -1211,9 +1207,8 @@ TEST_F(DataReductionProxyNetworkDelegateTest, RedirectRequestDataCleared) {
network_delegate()->NotifyBeforeRedirect(request.get(), GURL(kTestURL));
data = DataReductionProxyData::GetData(*request);
EXPECT_FALSE(data && data->used_data_reduction_proxy());
// page_id and request_info should be persisted across redirects.
// page_id should be persisted across redirects.
EXPECT_EQ(original_page_id, data->page_id().value());
EXPECT_EQ(1u, data->request_info().size());
// Call NotifyBeforeSendHeaders again with different proxy info to check that
// new data isn't added. Use a new set of headers since the redirected HTTP
......
......@@ -340,20 +340,6 @@ PageloadMetrics_ConnectionType ProtoConnectionTypeFromConnectionType(
}
}
RequestInfo_Protocol ProtoRequestInfoProtocolFromRequestInfoProtocol(
DataReductionProxyData::RequestInfo::Protocol protocol) {
switch (protocol) {
case DataReductionProxyData::RequestInfo::Protocol::HTTP:
return RequestInfo_Protocol_HTTP;
case DataReductionProxyData::RequestInfo::Protocol::HTTPS:
return RequestInfo_Protocol_HTTPS;
case DataReductionProxyData::RequestInfo::Protocol::QUIC:
return RequestInfo_Protocol_QUIC;
case DataReductionProxyData::RequestInfo::Protocol::UNKNOWN:
return RequestInfo_Protocol_UNKNOWN;
}
}
net::ProxyServer::Scheme SchemeFromProxyScheme(
ProxyServer_ProxyScheme proxy_scheme) {
switch (proxy_scheme) {
......
......@@ -8,7 +8,6 @@
#include <memory>
#include <string>
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h"
#include "components/data_reduction_proxy/proto/client_config.pb.h"
#include "components/data_reduction_proxy/proto/pageload_metrics.pb.h"
......@@ -146,10 +145,6 @@ ProtoEffectiveConnectionTypeFromEffectiveConnectionType(
PageloadMetrics_ConnectionType ProtoConnectionTypeFromConnectionType(
net::NetworkChangeNotifier::ConnectionType connection_type);
// Returns the RequestInfo_Protocol equivalent of |protocol|.
RequestInfo_Protocol ProtoRequestInfoProtocolFromRequestInfoProtocol(
DataReductionProxyData::RequestInfo::Protocol protocol);
// Returns the |net::ProxyServer::Scheme| for a ProxyServer_ProxyScheme.
net::ProxyServer::Scheme SchemeFromProxyScheme(
ProxyServer_ProxyScheme proxy_scheme);
......
......@@ -27,37 +27,10 @@ message RecordPageloadMetricsRequest {
optional PageloadDeviceInfo device_info = 3;
}
// Information about each network transaction used to load the main frame HTML.
message RequestInfo {
enum Protocol {
UNKNOWN = 0;
HTTP = 1;
HTTPS = 2;
QUIC = 3;
};
// The protocol used to connect to the Data Saver proxy.
optional Protocol protocol = 1;
// True if this request received a proxy bypass.
optional bool proxy_bypass = 2;
// Time to resolve DNS. e.g., to resolve proxy.googlezip.net.
optional Duration dns_time = 3;
// For TCP protocols, this is TCP connect + TLS setup.
// For 1RTT QUIC, this is the QUIC connection time (which includes TLS).
// For 0RTT QUIC (or TLS1.3 with fast-open), this will be zero.
optional Duration connect_time = 4;
// Time between sending the HTTP request and receiving the response.
optional Duration http_time = 5;
}
// Metrics for a single pageload.
message PageloadMetrics {
// Next ID: 32
reserved 3;
reserved 3, 26;
// The possible effective connection type values.
// See //net/nqe/effective_connection_type.h for the detailed description of
......@@ -233,13 +206,6 @@ message PageloadMetrics {
// The queuing delay for the first user input on the page.
optional Duration first_input_delay = 25;
// Connection timing information for each network transaction to load the main
// frame HTML. If the main frame HTML was reached after N redirects, then this
// array has N+1 values. In most cases we expect this will have 1 value. The
// first value is the original request and each following value is the next
// redirect in order.
repeated RequestInfo main_frame_network_request = 26;
// The time when the page load was ended.
optional Duration page_end_time = 27;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment