bug 1189692 - add telem for quic advertisements r=hurley

This commit is contained in:
Patrick McManus 2015-07-31 05:43:24 -04:00
parent d7dfd8218c
commit f41c4e972f
3 changed files with 21 additions and 7 deletions

View File

@ -25,6 +25,7 @@ HTTP_ATOM(Age, "Age")
HTTP_ATOM(Allow, "Allow")
HTTP_ATOM(Alternate_Service, "Alt-Svc")
HTTP_ATOM(Alternate_Service_Used, "Alt-Used")
HTTP_ATOM(Alternate_Protocol, "Alternate-Protocol")
HTTP_ATOM(Assoc_Req, "Assoc-Req")
HTTP_ATOM(Authentication, "Authentication")
HTTP_ATOM(Authorization, "Authorization")

View File

@ -1397,13 +1397,21 @@ nsHttpChannel::ProcessResponse()
nsresult rv;
uint32_t httpStatus = mResponseHead->Status();
// Gather data on whether the transaction and page (if this is
// the initial page load) is being loaded with SSL.
Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
mConnectionInfo->EndToEndSSL());
if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
// do some telemetry
if (gHttpHandler->IsTelemetryEnabled()) {
// Gather data on whether the transaction and page (if this is
// the initial page load) is being loaded with SSL.
Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
mConnectionInfo->EndToEndSSL());
if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
mConnectionInfo->EndToEndSSL());
}
// how often do we see something like Alternate-Protocol: "443:quic,p=1"
const char *alt_protocol = mResponseHead->PeekHeader(nsHttp::Alternate_Protocol);
bool saw_quic = (alt_protocol && PL_strstr(alt_protocol, "quic")) ? 1 : 0;
Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic);
}
LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n",

View File

@ -1657,7 +1657,12 @@
"extended_statistics_ok": true,
"description": "Time from submission to dispatch of SPDY transaction (ms)"
},
"HTTP_DISK_CACHE_OVERHEAD": {
"HTTP_SAW_QUIC_ALT_PROTOCOL": {
"expires_in_version": "never",
"kind": "boolean",
"description": "Fraction of responses with a quic alt-protocol advertisement."
},
"HTTP_DISK_CACHE_OVERHEAD": {
"expires_in_version": "default",
"kind": "exponential",
"high": "32000000",