Commit af74a462 authored by Charlie Harrison's avatar Charlie Harrison Committed by Commit Bot

Remove predictor metrics

These metrics are unmonitored, and the predictor is being replaced by
a new system.

Bug: 831006
Change-Id: I2f3260637581960b059319e92f434091426252bb
Reviewed-on: https://chromium-review.googlesource.com/1057461Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarAlexandr Ilin <alexilin@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558670}
parent 5ff2f680
......@@ -661,8 +661,6 @@ void Predictor::FinalizeInitializationOnIOThread(
DnsPrefetchMotivatedList(startup_urls, UrlInfo::STARTUP_LIST_MOTIVATED);
DeserializeReferrers(*referral_list);
LogStartupMetrics();
}
//-----------------------------------------------------------------------------
......@@ -809,8 +807,6 @@ void Predictor::PreconnectUrlOnIOThread(
if (!getter)
return;
UMA_HISTOGRAM_ENUMERATION("Net.PreconnectMotivation", motivation,
UrlInfo::MAX_MOTIVATED);
content::PreconnectUrl(getter, url, site_for_cookies, count,
allow_credentials);
}
......@@ -893,14 +889,9 @@ void Predictor::PrepareFrameSubresources(const GURL& original_url,
UrlInfo::LEARNED_REFERAL_MOTIVATED;
for (std::map<GURL, ReferrerValue>::iterator future_url = referrer->begin();
future_url != referrer->end();) {
SubresourceValue evalution(TOO_NEW);
double connection_expectation = future_url->second.subresource_use_rate();
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.PreconnectSubresourceExpectation",
static_cast<int>(connection_expectation * 100),
10, 5000, 50);
future_url->second.ReferrerWasObserved();
if (connection_expectation > kPreconnectWorthyExpectedValue) {
evalution = PRECONNECTION;
future_url->second.IncrementPreconnectionCount();
int count = static_cast<int>(std::ceil(connection_expectation));
if (url.host_piece() == future_url->first.host_piece())
......@@ -908,7 +899,6 @@ void Predictor::PrepareFrameSubresources(const GURL& original_url,
PreconnectUrlOnIOThread(future_url->first, site_for_cookies, motivation,
kAllowCredentialsOnPreconnectByDefault, count);
} else if (connection_expectation > kDNSPreresolutionWorthyExpectedValue) {
evalution = PRERESOLUTION;
future_url->second.preresolution_increment();
AppendToResolutionQueue(future_url->first, motivation);
}
......@@ -920,8 +910,6 @@ void Predictor::PrepareFrameSubresources(const GURL& original_url,
} else {
++future_url;
}
UMA_HISTOGRAM_ENUMERATION("Net.PreconnectSubresourceEval", evalution,
SUBRESOURCE_VALUE_MAX);
}
// If the Referrer has no URLs associated with it, remove it from the map.
if (referrer->empty())
......@@ -1066,21 +1054,6 @@ GURL Predictor::GetHSTSRedirectOnIOThread(const GURL& url) {
return url.ReplaceComponents(replacements);
}
void Predictor::LogStartupMetrics() {
size_t total_bytes = 0;
for (const auto& referrer : referrers_) {
total_bytes += referrer.first.spec().size();
total_bytes += sizeof(Referrer);
for (const auto& subresource : referrer.second) {
total_bytes += subresource.first.spec().size();
total_bytes += sizeof(ReferrerValue);
}
}
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.Predictor.Startup.DBSize", total_bytes, 1,
10 * 1000 * 1000, 50);
}
// ---------------------- End IO methods. -------------------------------------
//-----------------------------------------------------------------------------
......
......@@ -412,8 +412,6 @@ class Predictor {
// Applies the HSTS redirect for |url|, if any.
GURL GetHSTSRedirectOnIOThread(const GURL& url);
void LogStartupMetrics();
// ------------- End IO thread methods.
std::unique_ptr<InitialObserver> initial_observer_;
......
......@@ -48298,6 +48298,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="Net.PreconnectMotivation" enum="PreconnectMotivation">
<obsolete>
Deprecated May 2018
</obsolete>
<owner>csharrison@chromium.org</owner>
<summary>
When a preconnection is made, indicate what the motivation was.
......@@ -48335,6 +48338,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<histogram name="Net.PreconnectSubresourceEval"
enum="PreconnectSubresourceEval">
<obsolete>
Deprecated May 2018
</obsolete>
<owner>csharrison@chromium.org</owner>
<summary>
What did we decide to do about a predicted resource, based on the historical
......@@ -48349,6 +48355,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="Net.PreconnectSubresourceExpectation">
<obsolete>
Deprecated May 2018
</obsolete>
<owner>csharrison@chromium.org</owner>
<summary>
The expected number of connections, times 100, that we'll make to a given
......@@ -48416,6 +48425,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="Net.Predictor.Startup.DBSize" units="bytes">
<obsolete>
Deprecated May 2018
</obsolete>
<owner>csharrison@chromium.org</owner>
<summary>
The approximate size in bytes of the predictor's database on startup.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment