summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
commitab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (patch)
treec44670a25d942a672951e430499f70978ec7d337 /netwerk/protocol
parent45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff)
downloadUXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.lz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.xz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.zip
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables). Stub resolution/removal should be a follow-up to this.
Diffstat (limited to 'netwerk/protocol')
-rw-r--r--netwerk/protocol/http/ASpdySession.cpp2
-rw-r--r--netwerk/protocol/http/Http2Compression.cpp16
-rw-r--r--netwerk/protocol/http/Http2Session.cpp11
-rw-r--r--netwerk/protocol/http/Http2Stream.cpp11
-rw-r--r--netwerk/protocol/http/HttpBaseChannel.cpp2
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp223
-rw-r--r--netwerk/protocol/http/nsHttpChannelAuthProvider.cpp34
-rw-r--r--netwerk/protocol/http/nsHttpConnection.cpp24
-rw-r--r--netwerk/protocol/http/nsHttpConnectionMgr.cpp16
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp6
-rw-r--r--netwerk/protocol/websocket/WebSocketChannel.cpp2
11 files changed, 3 insertions, 344 deletions
diff --git a/netwerk/protocol/http/ASpdySession.cpp b/netwerk/protocol/http/ASpdySession.cpp
index f22c326d1..d5d98804d 100644
--- a/netwerk/protocol/http/ASpdySession.cpp
+++ b/netwerk/protocol/http/ASpdySession.cpp
@@ -45,8 +45,6 @@ ASpdySession::NewSpdySession(uint32_t version,
// from a list provided in the SERVER HELLO filtered by our acceptable
// versions, so there is no risk of the server ignoring our prefs.
- Telemetry::Accumulate(Telemetry::SPDY_VERSION2, version);
-
return new Http2Session(aTransport, version, attemptingEarlyData);
}
diff --git a/netwerk/protocol/http/Http2Compression.cpp b/netwerk/protocol/http/Http2Compression.cpp
index 1b4603e1a..64fd05a17 100644
--- a/netwerk/protocol/http/Http2Compression.cpp
+++ b/netwerk/protocol/http/Http2Compression.cpp
@@ -292,12 +292,6 @@ Http2BaseCompressor::Http2BaseCompressor()
Http2BaseCompressor::~Http2BaseCompressor()
{
- if (mPeakSize) {
- Telemetry::Accumulate(mPeakSizeID, mPeakSize);
- }
- if (mPeakCount) {
- Telemetry::Accumulate(mPeakCountID, mPeakCount);
- }
UnregisterStrongMemoryReporter(mDynamicReporter);
mDynamicReporter->mCompressor = nullptr;
mDynamicReporter = nullptr;
@@ -336,16 +330,6 @@ Http2BaseCompressor::MakeRoom(uint32_t amount, const char *direction)
bytesEvicted += mHeaderTable[index]->Size();
mHeaderTable.RemoveElement();
}
-
- if (!strcmp(direction, "decompressor")) {
- Telemetry::Accumulate(Telemetry::HPACK_ELEMENTS_EVICTED_DECOMPRESSOR, countEvicted);
- Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_DECOMPRESSOR, bytesEvicted);
- Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_RATIO_DECOMPRESSOR, (uint32_t)((100.0 * (double)bytesEvicted) / (double)amount));
- } else {
- Telemetry::Accumulate(Telemetry::HPACK_ELEMENTS_EVICTED_COMPRESSOR, countEvicted);
- Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_COMPRESSOR, bytesEvicted);
- Telemetry::Accumulate(Telemetry::HPACK_BYTES_EVICTED_RATIO_COMPRESSOR, (uint32_t)((100.0 * (double)bytesEvicted) / (double)amount));
- }
}
void
diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp
index 4f350af83..4a178f091 100644
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -168,13 +168,6 @@ Http2Session::~Http2Session()
this, mDownstreamState));
Shutdown();
-
- Telemetry::Accumulate(Telemetry::SPDY_PARALLEL_STREAMS, mConcurrentHighWater);
- Telemetry::Accumulate(Telemetry::SPDY_REQUEST_PER_CONN, (mNextStreamID - 1) / 2);
- Telemetry::Accumulate(Telemetry::SPDY_SERVER_INITIATED_STREAMS,
- mServerPushedResources);
- Telemetry::Accumulate(Telemetry::SPDY_GOAWAY_LOCAL, mClientGoAwayReason);
- Telemetry::Accumulate(Telemetry::SPDY_GOAWAY_PEER, mPeerGoAwayReason);
}
void
@@ -1508,13 +1501,11 @@ Http2Session::RecvSettings(Http2Session *self)
case SETTINGS_TYPE_MAX_CONCURRENT:
self->mMaxConcurrent = value;
- Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_MAX_STREAMS, value);
self->ProcessPending();
break;
case SETTINGS_TYPE_INITIAL_WINDOW:
{
- Telemetry::Accumulate(Telemetry::SPDY_SETTINGS_IW, value >> 10);
int32_t delta = value - self->mServerInitialStreamWindow;
self->mServerInitialStreamWindow = value;
@@ -2494,8 +2485,6 @@ Http2Session::ReadyToProcessDataFrame(enum internalStateType newState)
newState == DISCARDING_DATA_FRAME_PADDING);
ChangeDownstreamState(newState);
- Telemetry::Accumulate(Telemetry::SPDY_CHUNK_RECVD,
- mInputFrameDataSize >> 10);
mLastDataReadEpoch = mLastReadEpoch;
if (!mInputFrameID) {
diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp
index 7a8f96855..3471985dd 100644
--- a/netwerk/protocol/http/Http2Stream.cpp
+++ b/netwerk/protocol/http/Http2Stream.cpp
@@ -21,7 +21,6 @@
#include "Http2Push.h"
#include "TunnelUtils.h"
-#include "mozilla/Telemetry.h"
#include "nsAlgorithm.h"
#include "nsHttp.h"
#include "nsHttpHandler.h"
@@ -658,8 +657,6 @@ Http2Stream::GenerateOpen()
outputOffset += frameLen;
}
- Telemetry::Accumulate(Telemetry::SPDY_SYN_SIZE, compressedData.Length());
-
// The size of the input headers is approximate
uint32_t ratio =
compressedData.Length() * 100 /
@@ -667,7 +664,6 @@ Http2Stream::GenerateOpen()
mFlatHttpRequestHeaders.Length());
mFlatHttpRequestHeaders.Truncate();
- Telemetry::Accumulate(Telemetry::SPDY_SYN_RATIO, ratio);
return NS_OK;
}
@@ -1025,13 +1021,6 @@ Http2Stream::ConvertResponseHeaders(Http2Decompressor *decompressor,
return NS_ERROR_ILLEGAL_VALUE;
}
- if (aHeadersIn.Length() && aHeadersOut.Length()) {
- Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_SIZE, aHeadersIn.Length());
- uint32_t ratio =
- aHeadersIn.Length() * 100 / aHeadersOut.Length();
- Telemetry::Accumulate(Telemetry::SPDY_SYN_REPLY_RATIO, ratio);
- }
-
// The decoding went ok. Now we can customize and clean up.
aHeadersIn.Truncate();
diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp
index d161f9a43..c4e764d26 100644
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -49,7 +49,6 @@
#include "LoadInfo.h"
#include "nsNullPrincipal.h"
#include "nsISSLSocketControl.h"
-#include "mozilla/Telemetry.h"
#include "nsIURL.h"
#include "nsIConsoleService.h"
#include "mozilla/BinarySearch.h"
@@ -1006,7 +1005,6 @@ HttpBaseChannel::DoApplyContentConversions(nsIStreamListener* aNextListener,
} else if (from.Equals("br")) {
mode = 3;
}
- Telemetry::Accumulate(Telemetry::HTTP_CONTENT_ENCODING, mode);
}
nextListener = converter;
}
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index d7247eeab..bb0b3ca77 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -133,18 +133,7 @@ enum CacheDisposition {
void
AccumulateCacheHitTelemetry(CacheDisposition hitOrMiss)
{
- if (!CacheObserver::UseNewCache()) {
- Telemetry::Accumulate(Telemetry::HTTP_CACHE_DISPOSITION_2, hitOrMiss);
- }
- else {
- Telemetry::Accumulate(Telemetry::HTTP_CACHE_DISPOSITION_2_V2, hitOrMiss);
-
- int32_t experiment = CacheObserver::HalfLifeExperiment();
- if (experiment > 0 && hitOrMiss == kCacheMissed) {
- Telemetry::Accumulate(Telemetry::HTTP_CACHE_MISS_HALFLIFE_EXPERIMENT_2,
- experiment - 1);
- }
- }
+ /* STUB */
}
// Computes and returns a SHA1 hash of the input buffer. The input buffer
@@ -1141,26 +1130,21 @@ EnsureMIMEOfScript(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo*
if (nsContentUtils::IsJavascriptMIMEType(typeString)) {
// script load has type script
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 1);
return NS_OK;
}
bool block = false;
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/"))) {
// script load has type image
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 2);
block = true;
} else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("audio/"))) {
// script load has type audio
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 3);
block = true;
} else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("video/"))) {
// script load has type video
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 4);
block = true;
} else if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/csv"))) {
// script load has type text/csv
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 6);
block = true;
}
@@ -1186,42 +1170,35 @@ EnsureMIMEOfScript(nsIURI* aURI, nsHttpResponseHead* aResponseHead, nsILoadInfo*
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/plain"))) {
// script load has type text/plain
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 5);
return NS_OK;
}
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/xml"))) {
// script load has type text/xml
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 7);
return NS_OK;
}
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("application/octet-stream"))) {
// script load has type application/octet-stream
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 8);
return NS_OK;
}
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("application/xml"))) {
// script load has type application/xml
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 9);
return NS_OK;
}
if (StringBeginsWith(contentType, NS_LITERAL_CSTRING("text/html"))) {
// script load has type text/html
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 10);
return NS_OK;
}
if (contentType.IsEmpty()) {
// script load has no type
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 11);
return NS_OK;
}
// script load has unknown type
- Telemetry::Accumulate(Telemetry::SCRIPT_BLOCK_INCORRECT_MIME, 0);
return NS_OK;
}
@@ -1867,65 +1844,6 @@ nsHttpChannel::ProcessResponse()
LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n",
this, httpStatus));
- // 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"
- nsAutoCString alt_protocol;
- mResponseHead->GetHeader(nsHttp::Alternate_Protocol, alt_protocol);
- bool saw_quic = (!alt_protocol.IsEmpty() &&
- PL_strstr(alt_protocol.get(), "quic")) ? 1 : 0;
- Telemetry::Accumulate(Telemetry::HTTP_SAW_QUIC_ALT_PROTOCOL, saw_quic);
-
- // Gather data on how many URLS get redirected
- switch (httpStatus) {
- case 200:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 0);
- break;
- case 301:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 1);
- break;
- case 302:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 2);
- break;
- case 304:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 3);
- break;
- case 307:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 4);
- break;
- case 308:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 5);
- break;
- case 400:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 6);
- break;
- case 401:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 7);
- break;
- case 403:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 8);
- break;
- case 404:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 9);
- break;
- case 500:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 10);
- break;
- default:
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_STATUS_CODE, 11);
- break;
- }
- }
-
// Let the predictor know whether this was a cacheable response or not so
// that it knows whether or not to possibly prefetch this resource in the
// future.
@@ -2204,9 +2122,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv)
}
AccumulateCacheHitTelemetry(cacheDisposition);
- Telemetry::Accumulate(Telemetry::HTTP_RESPONSE_VERSION,
- mResponseHead->Version());
-
if (mResponseHead->Version() == NS_HTTP_VERSION_0_9) {
// DefaultPortTopLevel = 0, DefaultPortSubResource = 1,
// NonDefaultPortTopLevel = 2, NonDefaultPortSubResource = 3
@@ -2217,7 +2132,6 @@ nsHttpChannel::ContinueProcessResponse2(nsresult rv)
if (mConnectionInfo->OriginPort() != mConnectionInfo->DefaultPort()) {
v09Info += 2;
}
- Telemetry::Accumulate(Telemetry::HTTP_09_INFO, v09Info);
}
}
return rv;
@@ -3212,7 +3126,6 @@ nsHttpChannel::ProcessNotModified()
PipelineFeedbackInfo(mConnectionInfo,
nsHttpConnectionMgr::RedCorruptedContent,
nullptr, 0);
- Telemetry::Accumulate(Telemetry::CACHE_LM_INCONSISTENT, true);
}
// merge any new headers with the cached response headers
@@ -4222,11 +4135,6 @@ nsHttpChannel::OnNormalCacheEntryAvailable(nsICacheEntry *aEntry,
if (NS_SUCCEEDED(aEntryStatus)) {
mCacheEntry = aEntry;
mCacheEntryIsWriteOnly = aNew;
-
- if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
- Telemetry::Accumulate(Telemetry::HTTP_OFFLINE_CACHE_DOCUMENT_LOAD,
- false);
- }
}
return NS_OK;
@@ -5897,17 +5805,13 @@ nsHttpChannel::BeginConnect()
LOG(("nsHttpChannel %p Using connection info from altsvc mapping", this));
mapping->GetConnectionInfo(getter_AddRefs(mConnectionInfo), proxyInfo, originAttributes);
- Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, true);
- Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC_OE, !isHttps);
} else if (mConnectionInfo) {
LOG(("nsHttpChannel %p Using channel supplied connection info", this));
- Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, false);
} else {
LOG(("nsHttpChannel %p Using default connection info", this));
mConnectionInfo = new nsHttpConnectionInfo(host, port, EmptyCString(), mUsername, proxyInfo,
originAttributes, isHttps);
- Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_USE_ALTSVC, false);
}
// Set network interface id only when it's not empty to avoid
@@ -6829,7 +6733,6 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
chanDisposition = static_cast<ChannelDisposition>(chanDisposition + kHttpsCanceled);
}
LOG((" nsHttpChannel::OnStopRequest ChannelDisposition %d\n", chanDisposition));
- Telemetry::Accumulate(Telemetry::HTTP_CHANNEL_DISPOSITION, chanDisposition);
// if needed, check cache entry has all data we expect
if (mCacheEntry && mCachePump &&
@@ -8200,129 +8103,7 @@ nsHttpChannel::SetDoNotTrack()
void
nsHttpChannel::ReportNetVSCacheTelemetry()
{
- nsresult rv;
- if (!mCacheEntry) {
- return;
- }
-
- // We only report telemetry if the entry is persistent (on disk)
- bool persistent;
- rv = mCacheEntry->GetPersistent(&persistent);
- if (NS_FAILED(rv) || !persistent) {
- return;
- }
-
- nsXPIDLCString tmpStr;
- rv = mCacheEntry->GetMetaDataElement("net-response-time-onstart",
- getter_Copies(tmpStr));
- if (NS_FAILED(rv)) {
- return;
- }
- uint64_t onStartNetTime = tmpStr.ToInteger64(&rv);
- if (NS_FAILED(rv)) {
- return;
- }
-
- tmpStr.Truncate();
- rv = mCacheEntry->GetMetaDataElement("net-response-time-onstop",
- getter_Copies(tmpStr));
- if (NS_FAILED(rv)) {
- return;
- }
- uint64_t onStopNetTime = tmpStr.ToInteger64(&rv);
- if (NS_FAILED(rv)) {
- return;
- }
-
- uint64_t onStartCacheTime = (mOnStartRequestTimestamp - mAsyncOpenTime).ToMilliseconds();
- int64_t onStartDiff = onStartNetTime - onStartCacheTime;
- onStartDiff += 500; // We offset the difference by 500 ms to report positive values in telemetry
-
- uint64_t onStopCacheTime = (mCacheReadEnd - mAsyncOpenTime).ToMilliseconds();
- int64_t onStopDiff = onStopNetTime - onStopCacheTime;
- onStopDiff += 500; // We offset the difference by 500 ms
-
- if (mDidReval) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_REVALIDATED, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_REVALIDATED, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_NOTREVALIDATED, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_NOTREVALIDATED, onStopDiff);
- }
-
- if (mDidReval) {
- // We don't report revalidated probes as the data would be skewed.
- return;
- }
-
- uint32_t diskStorageSizeK = 0;
- rv = mCacheEntry->GetDiskStorageSizeInKB(&diskStorageSizeK);
- if (NS_FAILED(rv)) {
- return;
- }
-
- nsAutoCString contentType;
- if (mResponseHead && mResponseHead->HasContentType()) {
- mResponseHead->ContentType(contentType);
- }
- bool isImage = StringBeginsWith(contentType, NS_LITERAL_CSTRING("image/"));
- if (isImage) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_ISIMG, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_ISIMG, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_NOTIMG, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_NOTIMG, onStopDiff);
- }
-
- if (mCacheOpenWithPriority) {
- if (mCacheQueueSizeWhenOpen < 5) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QSMALL_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QSMALL_HIGHPRI, onStopDiff);
- } else if (mCacheQueueSizeWhenOpen < 10) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QMED_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QMED_HIGHPRI, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QBIG_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QBIG_HIGHPRI, onStopDiff);
- }
- } else { // The limits are higher for normal priority cache queues
- if (mCacheQueueSizeWhenOpen < 10) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QSMALL_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QSMALL_NORMALPRI, onStopDiff);
- } else if (mCacheQueueSizeWhenOpen < 50) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QMED_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QMED_NORMALPRI, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_QBIG_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_QBIG_NORMALPRI, onStopDiff);
- }
- }
-
- if (diskStorageSizeK < 32) {
- if (mCacheOpenWithPriority) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_SMALL_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_SMALL_HIGHPRI, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_SMALL_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_SMALL_NORMALPRI, onStopDiff);
- }
- } else if (diskStorageSizeK < 256) {
- if (mCacheOpenWithPriority) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_MED_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_MED_HIGHPRI, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_MED_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_MED_NORMALPRI, onStopDiff);
- }
- } else {
- if (mCacheOpenWithPriority) {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_LARGE_HIGHPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_LARGE_HIGHPRI, onStopDiff);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTART_LARGE_NORMALPRI, onStartDiff);
- Telemetry::Accumulate(Telemetry::HTTP_NET_VS_CACHE_ONSTOP_LARGE_NORMALPRI, onStopDiff);
- }
- }
+ /* STUB */
}
} // namespace net
diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
index d04f47ddc..0e7eb55c3 100644
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -867,24 +867,6 @@ nsHttpChannelAuthProvider::GetCredentialsForChallenge(const char *challenge,
else if (authFlags & nsIHttpAuthenticator::IDENTITY_ENCRYPTED)
level = nsIAuthPrompt2::LEVEL_PW_ENCRYPTED;
- // Collect statistics on how frequently the various types of HTTP
- // authentication are used over SSL and non-SSL connections.
- if (gHttpHandler->IsTelemetryEnabled()) {
- if (NS_LITERAL_CSTRING("basic").LowerCaseEqualsASCII(authType)) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS,
- UsingSSL() ? HTTP_AUTH_BASIC_SECURE : HTTP_AUTH_BASIC_INSECURE);
- } else if (NS_LITERAL_CSTRING("digest").LowerCaseEqualsASCII(authType)) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS,
- UsingSSL() ? HTTP_AUTH_DIGEST_SECURE : HTTP_AUTH_DIGEST_INSECURE);
- } else if (NS_LITERAL_CSTRING("ntlm").LowerCaseEqualsASCII(authType)) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS,
- UsingSSL() ? HTTP_AUTH_NTLM_SECURE : HTTP_AUTH_NTLM_INSECURE);
- } else if (NS_LITERAL_CSTRING("negotiate").LowerCaseEqualsASCII(authType)) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS,
- UsingSSL() ? HTTP_AUTH_NEGOTIATE_SECURE : HTTP_AUTH_NEGOTIATE_INSECURE);
- }
- }
-
// Depending on the pref setting, the authentication dialog may be
// blocked for all sub-resources, blocked for cross-origin
// sub-resources, or always allowed for sub-resources.
@@ -991,22 +973,6 @@ nsHttpChannelAuthProvider::BlockPrompt()
}
}
- if (gHttpHandler->IsTelemetryEnabled()) {
- if (topDoc) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS,
- HTTP_AUTH_DIALOG_TOP_LEVEL_DOC);
- } else if (xhr) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS,
- HTTP_AUTH_DIALOG_XHR);
- } else if (!mCrossOrigin) {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS,
- HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE);
- } else {
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS,
- HTTP_AUTH_DIALOG_CROSS_ORIGIN_SUBRESOURCE);
- }
- }
-
switch (sAuthAllowPref) {
case SUBRESOURCE_AUTH_DIALOG_DISALLOW_ALL:
// Do not open the http-authentication credentials dialog for
diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp
index c4564cd8b..8ccba76e2 100644
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -19,7 +19,6 @@
#include "ASpdySession.h"
#include "mozilla/ChaosMode.h"
-#include "mozilla/Telemetry.h"
#include "nsHttpConnection.h"
#include "nsHttpHandler.h"
#include "nsHttpPipeline.h"
@@ -105,18 +104,12 @@ nsHttpConnection::~nsHttpConnection()
if (!mEverUsedSpdy) {
LOG(("nsHttpConnection %p performed %d HTTP/1.x transactions\n",
this, mHttp1xTransactionCount));
- Telemetry::Accumulate(Telemetry::HTTP_REQUEST_PER_CONN,
- mHttp1xTransactionCount);
}
if (mTotalBytesRead) {
uint32_t totalKBRead = static_cast<uint32_t>(mTotalBytesRead >> 10);
LOG(("nsHttpConnection %p read %dkb on connection spdy=%d\n",
this, totalKBRead, mEverUsedSpdy));
- Telemetry::Accumulate(mEverUsedSpdy ?
- Telemetry::SPDY_KBREAD_PER_CONN :
- Telemetry::HTTP_KBREAD_PER_CONN,
- totalKBRead);
}
if (mForceSendTimer) {
mForceSendTimer->Cancel();
@@ -482,21 +475,6 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
int16_t tlsVersion;
ssl->GetSSLVersionUsed(&tlsVersion);
- // Send the 0RTT telemetry only for tls1.3
- if (tlsVersion > nsISSLSocketControl::TLS_VERSION_1_2) {
- Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_NEGOTIATED,
- (!mEarlyDataNegotiated) ? TLS_EARLY_DATA_NOT_AVAILABLE
- : ((mWaitingFor0RTTResponse) ? TLS_EARLY_DATA_AVAILABLE_AND_USED
- : TLS_EARLY_DATA_AVAILABLE_BUT_NOT_USED));
- if (mWaitingFor0RTTResponse) {
- Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_ACCEPTED,
- earlyDataAccepted);
- }
- if (earlyDataAccepted) {
- Telemetry::Accumulate(Telemetry::TLS_EARLY_DATA_BYTES_WRITTEN,
- mContentBytesWritten0RTT);
- }
- }
mWaitingFor0RTTResponse = false;
if (!earlyDataAccepted) {
@@ -518,8 +496,6 @@ nsHttpConnection::EnsureNPNComplete(nsresult &aOut0RTTWriteHandshakeValue,
StartSpdy(mSpdySession->SpdyVersion());
}
}
-
- Telemetry::Accumulate(Telemetry::SPDY_NPN_CONNECT, UsingSpdy());
}
npnComplete:
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
index 9271b49af..731cdff39 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -23,7 +23,6 @@
#include "mozilla/net/DNS.h"
#include "nsISocketTransport.h"
#include "nsISSLSocketControl.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/net/DashboardTypes.h"
#include "NullHttpTransaction.h"
#include "nsIDNSRecord.h"
@@ -847,7 +846,6 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
"with %s connections. rv=%x isJoined=%d",
preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(),
rv, isJoined));
- Telemetry::Accumulate(Telemetry::SPDY_NPN_JOIN, false);
return nullptr;
}
@@ -857,7 +855,6 @@ nsHttpConnectionMgr::GetSpdyPreferredEnt(nsConnectionEntry *aOriginalEntry)
"so %s will be coalesced with %s",
preferred->mConnInfo->Origin(), aOriginalEntry->mConnInfo->Origin(),
aOriginalEntry->mConnInfo->Origin(), preferred->mConnInfo->Origin()));
- Telemetry::Accumulate(Telemetry::SPDY_NPN_JOIN, true);
return preferred;
}
@@ -1835,16 +1832,7 @@ nsHttpConnectionMgr::BuildPipeline(nsConnectionEntry *ent,
void
nsHttpConnectionMgr::ReportProxyTelemetry(nsConnectionEntry *ent)
{
- enum { PROXY_NONE = 1, PROXY_HTTP = 2, PROXY_SOCKS = 3, PROXY_HTTPS = 4 };
-
- if (!ent->mConnInfo->UsingProxy())
- Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_NONE);
- else if (ent->mConnInfo->UsingHttpsProxy())
- Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_HTTPS);
- else if (ent->mConnInfo->UsingHttpProxy())
- Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_HTTP);
- else
- Telemetry::Accumulate(Telemetry::HTTP_PROXY_TYPE, PROXY_SOCKS);
+ /* STUB */
}
nsresult
@@ -3107,8 +3095,6 @@ nsHalfOpenSocket::SetupStreams(nsISocketTransport **transport,
rv = socketTransport->SetSecurityCallbacks(this);
NS_ENSURE_SUCCESS(rv, rv);
- Telemetry::Accumulate(Telemetry::HTTP_CONNECTION_ENTRY_CACHE_HIT_1,
- mEnt->mUsedForConnection);
mEnt->mUsedForConnection = true;
nsCOMPtr<nsIOutputStream> sout;
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index 89f09190d..6d58a7004 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -58,7 +58,6 @@
#include "mozilla/net/NeckoChild.h"
#include "mozilla/net/NeckoParent.h"
#include "mozilla/ipc/URIUtils.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/Unused.h"
#include "mozilla/BasePrincipal.h"
@@ -2182,11 +2181,6 @@ nsHttpHandler::Observe(nsISupports *subject,
// depend on this value.
mSessionStartTime = NowInSeconds();
- if (!mDoNotTrackEnabled) {
- Telemetry::Accumulate(Telemetry::DNT_USAGE, 2);
- } else {
- Telemetry::Accumulate(Telemetry::DNT_USAGE, 1);
- }
} else if (!strcmp(topic, "profile-change-net-restore")) {
// initialize connection manager
InitConnectionMgr();
diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp
index c6dc8d328..1bcdbcacc 100644
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -55,7 +55,6 @@
#include "nsNetUtil.h"
#include "nsINode.h"
#include "mozilla/StaticMutex.h"
-#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "nsSocketTransportService2.h"
@@ -2989,7 +2988,6 @@ WebSocketChannel::ReportConnectionTelemetry()
(didProxy ? (1 << 0) : 0);
LOG(("WebSocketChannel::ReportConnectionTelemetry() %p %d", this, value));
- Telemetry::Accumulate(Telemetry::WEBSOCKETS_HANDSHAKE_TYPE, value);
}
// nsIDNSListener