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

Unified Diff: base/metrics/histogram.h

Issue 2832333002: Revert of Embed a single sample in histogram metadata. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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 98c07aa39f8db5020d6c4abdffba33e5847b6e50..a76dd63226131b873490546965c9f572a1b2ce7c 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -86,13 +86,11 @@
class BooleanHistogram;
class CustomHistogram;
-class DelayedPersistentAllocation;
class Histogram;
class LinearHistogram;
class Pickle;
class PickleIterator;
class SampleVector;
-class SampleVectorBase;
class BASE_EXPORT Histogram : public HistogramBase {
public:
@@ -144,8 +142,9 @@
Sample minimum,
Sample maximum,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -231,8 +230,9 @@
Sample minimum,
Sample maximum,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -274,10 +274,10 @@
std::string* output) const;
// Find out how large (graphically) the largest bucket will appear to be.
- double GetPeakBucketSize(const SampleVectorBase& samples) const;
+ double GetPeakBucketSize(const SampleVector& samples) const;
// Write a common header message describing this histogram.
- void WriteAsciiHeader(const SampleVectorBase& samples,
+ void WriteAsciiHeader(const SampleVector& samples,
Count sample_count,
std::string* output) const;
@@ -304,7 +304,7 @@
// Finally, provide the state that changes with the addition of each new
// sample.
- std::unique_ptr<SampleVectorBase> samples_;
+ std::unique_ptr<SampleVector> samples_;
// Also keep a previous uploaded state for calculating deltas.
std::unique_ptr<HistogramSamples> logged_samples_;
@@ -357,8 +357,9 @@
Sample minimum,
Sample maximum,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -399,8 +400,9 @@
Sample minimum,
Sample maximum,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -444,8 +446,8 @@
static std::unique_ptr<HistogramBase> PersistentCreate(
const std::string& name,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -458,8 +460,8 @@
BooleanHistogram(const std::string& name, const BucketRanges* ranges);
BooleanHistogram(const std::string& name,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -494,8 +496,9 @@
static std::unique_ptr<HistogramBase> PersistentCreate(
const std::string& name,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
@@ -518,8 +521,9 @@
CustomHistogram(const std::string& name,
const BucketRanges* ranges,
- const DelayedPersistentAllocation& counts,
- const DelayedPersistentAllocation& logged_counts,
+ HistogramBase::AtomicCount* counts,
+ HistogramBase::AtomicCount* logged_counts,
+ uint32_t counts_size,
HistogramSamples::Metadata* meta,
HistogramSamples::Metadata* logged_meta);
« no previous file with comments | « no previous file | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698