Implement write methods for SparseHistogram
Implementation based on existing methods in Histogram.
BUG=
Review URL: https://chromiumcodereview.appspot.com/13469020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192636 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index 12d126dc..2fa846e 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -142,6 +142,21 @@
// counts to |buckets| and the total sample count to |count|.
virtual void GetCountAndBucketData(Count* count,
ListValue* buckets) const = 0;
+
+ //// 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.
+ const std::string GetSimpleAsciiBucketRange(Sample sample) 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(Count current,
+ double scaled_sum,
+ std::string* output) const;
+
private:
const std::string histogram_name_;
int32 flags_;