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

Unified Diff: base/metrics/histogram.h

Issue 17451016: [UMA] Remove redundant bucket_count variable from base::Histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename variables to be clearer Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/bucket_ranges_unittest.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.h
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
index 72da2e0415ffed6dfd190dd64cfdd64b5ac9cc02..033cb72cf067464d29683017f6130806327b70cc 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -396,7 +396,6 @@ class BASE_EXPORT Histogram : public HistogramBase {
static void InitializeBucketRanges(Sample minimum,
Sample maximum,
- size_t bucket_count,
BucketRanges* ranges);
// This constant if for FindCorruption. Since snapshots of histograms are
@@ -437,9 +436,10 @@ class BASE_EXPORT Histogram : public HistogramBase {
// HistogramBase implementation:
virtual HistogramType GetHistogramType() const OVERRIDE;
- virtual bool HasConstructionArguments(Sample minimum,
- Sample maximum,
- size_t bucket_count) const OVERRIDE;
+ virtual bool HasConstructionArguments(
+ Sample expected_minimum,
+ Sample expected_maximum,
+ size_t expected_bucket_count) const OVERRIDE;
virtual void Add(Sample value) OVERRIDE;
virtual scoped_ptr<HistogramSamples> SnapshotSamples() const OVERRIDE;
virtual void AddSamples(const HistogramSamples& samples) OVERRIDE;
@@ -448,12 +448,11 @@ class BASE_EXPORT Histogram : public HistogramBase {
virtual void WriteAscii(std::string* output) const OVERRIDE;
protected:
- // |bucket_count| and |ranges| should contain the underflow and overflow
- // buckets. See top comments for example.
+ // |ranges| should contain the underflow and overflow buckets. See top
+ // comments for example.
Histogram(const std::string& name,
Sample minimum,
Sample maximum,
- size_t bucket_count,
const BucketRanges* ranges);
virtual ~Histogram();
@@ -521,9 +520,8 @@ class BASE_EXPORT Histogram : public HistogramBase {
// Does not own this object. Should get from StatisticsRecorder.
const BucketRanges* bucket_ranges_;
- Sample declared_min_; // Less than this goes into counts_[0]
- Sample declared_max_; // Over this goes into counts_[bucket_count_ - 1].
- size_t bucket_count_; // Dimension of counts_[].
+ Sample declared_min_; // Less than this goes into the first bucket.
+ Sample declared_max_; // Over this goes into the last bucket.
// Finally, provide the state that changes with the addition of each new
// sample.
@@ -573,7 +571,6 @@ class BASE_EXPORT LinearHistogram : public Histogram {
static void InitializeBucketRanges(Sample minimum,
Sample maximum,
- size_t bucket_count,
BucketRanges* ranges);
// Overridden from Histogram:
@@ -583,7 +580,6 @@ class BASE_EXPORT LinearHistogram : public Histogram {
LinearHistogram(const std::string& name,
Sample minimum,
Sample maximum,
- size_t bucket_count,
const BucketRanges* ranges);
virtual double GetBucketSize(Count current, size_t i) const OVERRIDE;
« no previous file with comments | « base/metrics/bucket_ranges_unittest.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698