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

Side by Side Diff: net/socket/client_socket_pool_histograms.cc

Issue 6931048: Revert 84197 - Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/client_socket_pool_histograms.h" 5 #include "net/socket/client_socket_pool_histograms.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "net/socket/client_socket_handle.h" 11 #include "net/socket/client_socket_handle.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ClientSocketPoolHistograms::~ClientSocketPoolHistograms() { 51 ClientSocketPoolHistograms::~ClientSocketPoolHistograms() {
52 } 52 }
53 53
54 void ClientSocketPoolHistograms::AddSocketType(int type) const { 54 void ClientSocketPoolHistograms::AddSocketType(int type) const {
55 socket_type_->Add(type); 55 socket_type_->Add(type);
56 } 56 }
57 57
58 void ClientSocketPoolHistograms::AddRequestTime(base::TimeDelta time) const { 58 void ClientSocketPoolHistograms::AddRequestTime(base::TimeDelta time) const {
59 request_time_->AddTime(time); 59 request_time_->AddTime(time);
60 60
61 static const bool proxy_connection_impact_trial_exists = 61 static bool proxy_connection_impact_trial_exists(
62 base::FieldTrialList::TrialExists("ProxyConnectionImpact"); 62 base::FieldTrialList::Find("ProxyConnectionImpact") &&
63 !base::FieldTrialList::Find("ProxyConnectionImpact")->
64 group_name().empty());
63 if (proxy_connection_impact_trial_exists && is_http_proxy_connection_) { 65 if (proxy_connection_impact_trial_exists && is_http_proxy_connection_) {
64 UMA_HISTOGRAM_CUSTOM_TIMES( 66 UMA_HISTOGRAM_CUSTOM_TIMES(
65 base::FieldTrial::MakeName("Net.HttpProxySocketRequestTime", 67 base::FieldTrial::MakeName("Net.HttpProxySocketRequestTime",
66 "ProxyConnectionImpact"), 68 "ProxyConnectionImpact"),
67 time, 69 time,
68 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), 70 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
69 100); 71 100);
70 } 72 }
71 if (proxy_connection_impact_trial_exists && is_socks_connection_) { 73 if (proxy_connection_impact_trial_exists && is_socks_connection_) {
72 UMA_HISTOGRAM_CUSTOM_TIMES( 74 UMA_HISTOGRAM_CUSTOM_TIMES(
73 base::FieldTrial::MakeName("Net.SocksSocketRequestTime", 75 base::FieldTrial::MakeName("Net.SocksSocketRequestTime",
74 "ProxyConnectionImpact"), 76 "ProxyConnectionImpact"),
75 time, 77 time,
76 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10), 78 base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromMinutes(10),
77 100); 79 100);
78 } 80 }
79 } 81 }
80 82
81 void ClientSocketPoolHistograms::AddUnusedIdleTime(base::TimeDelta time) const { 83 void ClientSocketPoolHistograms::AddUnusedIdleTime(base::TimeDelta time) const {
82 unused_idle_time_->AddTime(time); 84 unused_idle_time_->AddTime(time);
83 } 85 }
84 86
85 void ClientSocketPoolHistograms::AddReusedIdleTime(base::TimeDelta time) const { 87 void ClientSocketPoolHistograms::AddReusedIdleTime(base::TimeDelta time) const {
86 reused_idle_time_->AddTime(time); 88 reused_idle_time_->AddTime(time);
87 } 89 }
88 90
89 } // namespace net 91 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698