diff options
author | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-19 17:45:21 +0000 |
---|---|---|
committer | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-19 17:45:21 +0000 |
commit | ac262c9fd9775f9d85c42eaf42fccb896ba790ba (patch) | |
tree | 666a943e0537d6fdad0bf393ff0dd6939ee13b53 /chrome/browser/render_widget_host_view_win.cc | |
parent | aef3555aa83038b26b50cfab04d685e0f6dfc04f (diff) | |
download | chromium_src-ac262c9fd9775f9d85c42eaf42fccb896ba790ba.zip chromium_src-ac262c9fd9775f9d85c42eaf42fccb896ba790ba.tar.gz chromium_src-ac262c9fd9775f9d85c42eaf42fccb896ba790ba.tar.bz2 |
Construct a field trial to see if HIGH or MEDIUM memory model "works better"
Includes definition of a FieldTrial class to support this.
I have thoughts in my head about how this will eventually
extend to be controllable via UMA (as well as being able
to run tests defined at compile time, as was done in this
example.
r=mbelshe, mmentovai
Review URL: http://codereview.chromium.org/7638
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_widget_host_view_win.cc')
-rw-r--r-- | chrome/browser/render_widget_host_view_win.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/render_widget_host_view_win.cc b/chrome/browser/render_widget_host_view_win.cc index 3788795..eef290f 100644 --- a/chrome/browser/render_widget_host_view_win.cc +++ b/chrome/browser/render_widget_host_view_win.cc @@ -11,6 +11,7 @@ #include "base/win_util.h" #include "chrome/browser/browser_accessibility.h" #include "chrome/browser/browser_accessibility_manager.h" +#include "chrome/browser/browser_trial.h" #include "chrome/browser/render_process_host.h" // TODO(beng): (Cleanup) we should not need to include this file... see comment // in |DidBecomeSelected|. @@ -433,7 +434,21 @@ void RenderWidgetHostViewWin::OnPaint(HDC dc) { } if (!whiteout_start_time_.is_null()) { TimeDelta whiteout_duration = TimeTicks::Now() - whiteout_start_time_; - UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration", whiteout_duration); + + // If field trial is active, report results in special histogram. + static scoped_refptr<FieldTrial> trial( + FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial)); + if (trial.get()) { + if (trial->boolean_value()) + UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_high_memory", + whiteout_duration); + else + UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration_trial_med_memory", + whiteout_duration); + } else { + UMA_HISTOGRAM_TIMES(L"MPArch.RWHH_WhiteoutDuration", whiteout_duration); + } + // Reset the start time to 0 so that we start recording again the next // time the backing store is NULL... whiteout_start_time_ = TimeTicks(); |