summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 16:31:54 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 16:31:54 +0000
commite695fbd6d62e9967d6256cd0667eca2fb2bb918d (patch)
tree58e196031e02447b31bd9a4182b8fb3f4d7ea81b /chrome/renderer/render_view.cc
parent5c7c19d83d201fa23d5097cce108c033ece5c63b (diff)
downloadchromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.zip
chromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.tar.gz
chromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.tar.bz2
Create A/B test of SDCH
To do this, I needed to add the feature that ALL FieldTrials that are established in the browser process are forwarded and established in the corresponding renderer processes. This then allows both DNS impact, as well as SDCH inmpact (and any other field tests) to be studied at the same time in a single binary. This checkin also establishes a pattern that when we're doing A/B tests via a histogram such as RequestToFinish, that we produce names for all groups, rather than leaving one group as the "default" or "empty postfix" group. This is critical for naming various sub-groups when a multitude of tests are taking place at the same time. BUG=15479 r=mbelshe Review URL: http://codereview.chromium.org/150087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r--chrome/renderer/render_view.cc26
1 files changed, 22 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 2fad6fb..5b33bd2 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1326,7 +1326,7 @@ void RenderView::DidReceiveTitle(WebView* webview,
void RenderView::DidFinishLoadForFrame(WebView* webview, WebFrame* frame) {
WebDataSource* ds = frame->GetDataSource();
NavigationState* navigation_state = NavigationState::FromDataSource(ds);
- // TODO(darin): It should not be possible for navigation_state to be null
+ // TODO(darin): It should not be possible for navigation_state to be null
// here!
if (navigation_state)
navigation_state->set_finish_load_time(Time::Now());
@@ -1344,7 +1344,7 @@ void RenderView::DidFinishDocumentLoadForFrame(WebView* webview,
WebFrame* frame) {
WebDataSource* ds = frame->GetDataSource();
NavigationState* navigation_state = NavigationState::FromDataSource(ds);
- // TODO(darin): It should not be possible for navigation_state to be null
+ // TODO(darin): It should not be possible for navigation_state to be null
// here!
if (navigation_state)
navigation_state->set_finish_document_load_time(Time::Now());
@@ -2894,10 +2894,28 @@ void RenderView::DumpLoadHistograms() const {
UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToCommit", commit - begin);
UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.BeginToFinishDoc", finish_doc - begin);
+
+ static const TimeDelta kBeginToFinishMin(TimeDelta::FromMilliseconds(10));
+ static const TimeDelta kBeginToFinishMax(TimeDelta::FromMinutes(10));
+ static const size_t kBeginToFinishBucketCount(100);
+
+ UMA_HISTOGRAM_CUSTOM_TIMES("Renderer4.BeginToFinish",
+ finish - begin, kBeginToFinishMin,
+ kBeginToFinishMax, kBeginToFinishBucketCount);
+
+ DCHECK(FieldTrialList::Find("DnsImpact") &&
+ !FieldTrialList::Find("DnsImpact")->group_name().empty());
UMA_HISTOGRAM_CUSTOM_TIMES(
FieldTrial::MakeName("Renderer4.BeginToFinish", "DnsImpact").data(),
- finish - begin, TimeDelta::FromMilliseconds(10),
- TimeDelta::FromMinutes(10), 100);
+ finish - begin, kBeginToFinishMin,
+ kBeginToFinishMax, kBeginToFinishBucketCount);
+
+ DCHECK(FieldTrialList::Find("GlobalSdch") &&
+ !FieldTrialList::Find("GlobalSdch")->group_name().empty());
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ FieldTrial::MakeName("Renderer4.BeginToFinish", "GlobalSdch").data(),
+ finish - begin, kBeginToFinishMin,
+ kBeginToFinishMax, kBeginToFinishBucketCount);
UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.CommitToFinish", finish - commit);