summaryrefslogtreecommitdiffstats
path: root/netwerk/base/Predictor.cpp
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/base/Predictor.cpp
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/base/Predictor.cpp')
-rw-r--r--netwerk/base/Predictor.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp
index e97b11d16..12e4eb415 100644
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -294,26 +294,9 @@ Predictor::Action::OnCacheEntryAvailable(nsICacheEntry *entry, bool isNew,
"Aborting.", this, result));
return NS_OK;
}
- Telemetry::AccumulateTimeDelta(Telemetry::PREDICTOR_WAIT_TIME,
- mStartTime);
- if (mPredict) {
- bool predicted = mPredictor->PredictInternal(mPredictReason, entry, isNew,
- mFullUri, mTargetURI,
- mVerifier, mStackCount);
- Telemetry::AccumulateTimeDelta(
- Telemetry::PREDICTOR_PREDICT_WORK_TIME, mStartTime);
- if (predicted) {
- Telemetry::AccumulateTimeDelta(
- Telemetry::PREDICTOR_PREDICT_TIME_TO_ACTION, mStartTime);
- } else {
- Telemetry::AccumulateTimeDelta(
- Telemetry::PREDICTOR_PREDICT_TIME_TO_INACTION, mStartTime);
- }
- } else {
+ if (!mPredict) {
mPredictor->LearnInternal(mLearnReason, entry, isNew, mFullUri, mTargetURI,
mSourceURI);
- Telemetry::AccumulateTimeDelta(
- Telemetry::PREDICTOR_LEARN_WORK_TIME, mStartTime);
}
return NS_OK;
@@ -1073,8 +1056,6 @@ Predictor::CalculateGlobalDegradation(uint32_t lastLoad)
globalDegradation = mPageDegradationMax;
}
- Telemetry::Accumulate(Telemetry::PREDICTOR_GLOBAL_DEGRADATION,
- globalDegradation);
return globalDegradation;
}
@@ -1139,10 +1120,6 @@ Predictor::CalculateConfidence(uint32_t hitCount, uint32_t hitsPossible,
confidence = std::max(confidence, 0);
confidence = std::min(confidence, maxConfidence);
- Telemetry::Accumulate(Telemetry::PREDICTOR_BASE_CONFIDENCE, baseConfidence);
- Telemetry::Accumulate(Telemetry::PREDICTOR_SUBRESOURCE_DEGRADATION,
- confidenceDegradation);
- Telemetry::Accumulate(Telemetry::PREDICTOR_CONFIDENCE, confidence);
return confidence;
}
@@ -2335,7 +2312,6 @@ Predictor::PrefetchListener::OnStopRequest(nsIRequest *aRequest,
if (NS_FAILED(aStatusCode)) {
return aStatusCode;
}
- Telemetry::AccumulateTimeDelta(Telemetry::PREDICTOR_PREFETCH_TIME, mStartTime);
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
if (!httpChannel) {