diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 23:51:25 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 23:51:25 +0000 |
commit | e2951cf3bd7e591a64ad5199a61531dac0ec58d2 (patch) | |
tree | 3039f816f6fa46008865c1ce4b1dd15de7b48d5a /base/histogram.h | |
parent | 0e8db94aef1b57355c3d154cb4682ce2f94c51eb (diff) | |
download | chromium_src-e2951cf3bd7e591a64ad5199a61531dac0ec58d2.zip chromium_src-e2951cf3bd7e591a64ad5199a61531dac0ec58d2.tar.gz chromium_src-e2951cf3bd7e591a64ad5199a61531dac0ec58d2.tar.bz2 |
Use histograms to send interesting parts of the disk cache statistics.
Most of this CL deals with a derived implementation of histograms that just
queries the size stats already generated by the disk cache. The exact number
of buckets, and their distribution, is controlled directly by the new class and
the disk cache stats code.
Review URL: http://codereview.chromium.org/3069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r-- | base/histogram.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/histogram.h b/base/histogram.h index 678cbf6..a2672e0 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -177,7 +177,7 @@ class Histogram : public StatsRate { void Add(const SampleSet& other); void Subtract(const SampleSet& other); - private: + protected: // Actual histogram data is stored in buckets, showing the count of values // that fit into each bucket. Counts counts_; @@ -208,6 +208,7 @@ class Histogram : public StatsRate { // 0x1 Currently used to mark this histogram to be recorded by UMA.. // 0x8000 means print ranges in hex. void SetFlags(int flags) { flags_ |= flags; } + void ClearFlags(int flags) { flags_ &= ~flags; } int flags() const { return flags_; } //---------------------------------------------------------------------------- @@ -216,8 +217,8 @@ class Histogram : public StatsRate { const std::string histogram_name() const { return histogram_name_; } Sample declared_min() const { return declared_min_; } Sample declared_max() const { return declared_max_; } - Sample ranges(size_t i) const { return ranges_[i];} - size_t bucket_count() const { return bucket_count_; } + virtual Sample ranges(size_t i) const { return ranges_[i];} + virtual size_t bucket_count() const { return bucket_count_; } // Snapshot the current complete set of sample data. // Override with atomic/locked snapshot if needed. virtual void SnapshotSample(SampleSet* sample) const; |