Chromium Code Reviews| Index: base/metrics/sparse_histogram.h |
| diff --git a/base/metrics/sparse_histogram.h b/base/metrics/sparse_histogram.h |
| index 9c207666e5d04c21fa97978438617827b7a4085f..ca1c537947a3afb9056fb24adaff5e4b1867628e 100644 |
| --- a/base/metrics/sparse_histogram.h |
| +++ b/base/metrics/sparse_histogram.h |
| @@ -90,6 +90,27 @@ class BASE_EXPORT_PRIVATE SparseHistogram : public HistogramBase { |
| virtual void GetCountAndBucketData(Count* count, |
| ListValue* buckets) const OVERRIDE; |
| + // Helpers for emitting Ascii graphic. Each method appends data to output. |
| + void WriteAsciiImpl(bool graph_it, |
| + const std::string& newline, |
| + std::string* output) const; |
| + |
| + // Write a common header message describing this histogram. |
| + void WriteAsciiHeader(const Count sample_count, |
| + std::string* output) const; |
| + |
| + // Write textual description of the bucket contents (relative to histogram). |
| + // Output is the count in the buckets, as well as the percentage. |
| + void WriteAsciiBucketValue(const Count current, const Count total, |
|
jar (doing other things)
2013/04/04 00:45:09
nit: one arg per line in declaration and definitio
jrummell
2013/04/04 22:38:59
Done.
|
| + std::string* output) const; |
| + |
| + // Produce actual graph (set of blank vs non blank char's) for a bucket. |
| + void WriteAsciiBucketGraph(double current_size, double max_size, |
| + std::string* output) const; |
| + |
| + // Return a string description of what goes in a given bucket. |
| + std::string GetAsciiBucketRange(const Sample sample) const; |
| + |
| // For constuctor calling. |
| friend class SparseHistogramTest; |