diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-29 11:02:27 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-02 14:39:54 +0200 |
commit | ee86d3eb9c468edbb81550d27114ed66b3d71ee5 (patch) | |
tree | a00ffa052ffb8d072203938f595548dcd3b2e0ed /netwerk/base/Predictor.cpp | |
parent | d0acadd727468ccaa4e3cbe3673e29890c2551ca (diff) | |
download | uxp-ee86d3eb9c468edbb81550d27114ed66b3d71ee5.tar.gz |
Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
Diffstat (limited to 'netwerk/base/Predictor.cpp')
-rw-r--r-- | netwerk/base/Predictor.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp index d892e5eeca..1b2020f5db 100644 --- a/netwerk/base/Predictor.cpp +++ b/netwerk/base/Predictor.cpp @@ -38,7 +38,6 @@ #include "mozilla/Logging.h" #include "mozilla/Preferences.h" -#include "mozilla/Telemetry.h" #include "mozilla/net/NeckoCommon.h" #include "mozilla/net/NeckoParent.h" @@ -1079,9 +1078,6 @@ Predictor::CalculateConfidence(uint32_t hitCount, uint32_t hitsPossible, { MOZ_ASSERT(NS_IsMainThread()); - Telemetry::AutoCounter<Telemetry::PREDICTOR_PREDICTIONS_CALCULATED> predictionsCalculated; - ++predictionsCalculated; - if (!hitsPossible) { return 0; } @@ -1316,18 +1312,11 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie preconnects.SwapElements(mPreconnects); preresolves.SwapElements(mPreresolves); - Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PREDICTIONS> totalPredictions; - Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PREFETCHES> totalPrefetches; - Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PRECONNECTS> totalPreconnects; - Telemetry::AutoCounter<Telemetry::PREDICTOR_TOTAL_PRERESOLVES> totalPreresolves; - len = prefetches.Length(); for (i = 0; i < len; ++i) { PREDICTOR_LOG((" doing prefetch")); nsCOMPtr<nsIURI> uri = prefetches[i]; if (NS_SUCCEEDED(Prefetch(uri, referrer, verifier))) { - ++totalPredictions; - ++totalPrefetches; predicted = true; } } @@ -1336,8 +1325,6 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie for (i = 0; i < len; ++i) { PREDICTOR_LOG((" doing preconnect")); nsCOMPtr<nsIURI> uri = preconnects[i]; - ++totalPredictions; - ++totalPreconnects; mSpeculativeService->SpeculativeConnect2(uri, nullptr, this); predicted = true; if (verifier) { @@ -1350,8 +1337,6 @@ Predictor::RunPredictions(nsIURI *referrer, nsINetworkPredictorVerifier *verifie nsCOMPtr<nsIThread> mainThread = do_GetMainThread(); for (i = 0; i < len; ++i) { nsCOMPtr<nsIURI> uri = preresolves[i]; - ++totalPredictions; - ++totalPreresolves; nsAutoCString hostname; uri->GetAsciiHost(hostname); PREDICTOR_LOG((" doing preresolve %s", hostname.get())); @@ -1482,9 +1467,6 @@ Predictor::Learn(nsIURI *targetURI, nsIURI *sourceURI, return NS_ERROR_INVALID_ARG; } - Telemetry::AutoCounter<Telemetry::PREDICTOR_LEARN_ATTEMPTS> learnAttempts; - ++learnAttempts; - Predictor::Reason argReason; argReason.mLearn = reason; |