diff options
author | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 01:40:22 +0000 |
---|---|---|
committer | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 01:40:22 +0000 |
commit | e08cb64009fc9f5011e1d752ec5dc08694da3911 (patch) | |
tree | 2d81eb7d2ff0becc14ddaabf99f468f2690a777e /base/histogram.h | |
parent | 4fea401af7447e1fe098b989ec07193b1b9080bf (diff) | |
download | chromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.zip chromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.tar.gz chromium_src-e08cb64009fc9f5011e1d752ec5dc08694da3911.tar.bz2 |
Adjust histograms to get better data for latency experiments
r=openvcdiff,huanr
Review URL: http://codereview.chromium.org/11810
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r-- | base/histogram.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/base/histogram.h b/base/histogram.h index af5f1fd..f56d05f 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -109,6 +109,13 @@ static const int kUmaTargetedHistogramFlag = 0x1; counter.AddTime(sample); \ } while (0) +#define UMA_HISTOGRAM_MEDIUM_TIMES(name, sample) do { \ + static Histogram counter((name), base::TimeDelta::FromMilliseconds(10), \ + base::TimeDelta::FromMinutes(3), 50); \ + counter.SetFlags(kUmaTargetedHistogramFlag); \ + counter.AddTime(sample); \ + } while (0) + // Use this macro when times can routinely be much longer than 10 seconds. #define UMA_HISTOGRAM_LONG_TIMES(name, sample) do { \ static Histogram counter((name), base::TimeDelta::FromMilliseconds(1), \ @@ -199,7 +206,7 @@ class Histogram : public StatsRate { // input the stats counter sees. virtual void Add(int value); - // The following methods provide a graphical histogram displays. + // The following methods provide graphical histogram displays. void WriteHTMLGraph(std::string* output) const; void WriteAscii(bool graph_it, const std::string& newline, std::string* output) const; |