Chromium Code Reviews| 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(); |