summaryrefslogtreecommitdiffstats
path: root/netwerk/base/Predictor.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-04 07:41:14 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-04 07:41:14 +0200
commit45ec2bceb4822646805136b8874a3681b14e78ef (patch)
treed1db6daa9b40f85e6bc36a6768d1b74d735454f8 /netwerk/base/Predictor.cpp
parent7d73b3fbfe1cd4f3a45b569f98f19041f95a50b9 (diff)
parent2e00eb87ef299e6eb7521670e6a6720fee19f5fc (diff)
downloadUXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar
UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.gz
UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.lz
UXP-45ec2bceb4822646805136b8874a3681b14e78ef.tar.xz
UXP-45ec2bceb4822646805136b8874a3681b14e78ef.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP
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) {