Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: net/http/http_server_properties_impl.cc

Issue 1537463004: AlternativeServiceServers - Added couple of histograms to measure if (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 77968ff7d6105a653b6f7746fee0713fe7e9a7ad..567f182f041bff5a36cdf3a44a0d2e80a572473b 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -10,6 +10,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
@@ -56,6 +57,16 @@ void HttpServerPropertiesImpl::InitializeSpdyServers(
void HttpServerPropertiesImpl::InitializeAlternativeServiceServers(
AlternativeServiceMap* alternative_service_map) {
+ int32 size_diff =
+ alternative_service_map->size() - alternative_service_map_.size();
+ if (size_diff > 0) {
+ UMA_HISTOGRAM_COUNTS("Net.AlternativeServiceServers.MorePrefsEntries",
+ size_diff);
+ } else {
Alexei Svitkine (slow) 2015/12/18 19:58:48 Should you check that size_diff isn't 0? It's fine
ramant (doing other things) 2015/12/18 21:34:55 Good point. Changed the histogram name and descrip
+ UMA_HISTOGRAM_COUNTS("Net.AlternativeServiceServers.MoreCacheEntries",
+ -size_diff);
+ }
+
// Add the entries from persisted data.
for (AlternativeServiceMap::reverse_iterator input_it =
alternative_service_map->rbegin();
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698