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

Unified Diff: base/metrics/histogram_base.h

Issue 13469020: Implement write methods for SparseHistogram (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase due to conflict in histogram_base.cc Created 7 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 | « base/metrics/histogram.cc ('k') | base/metrics/histogram_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base.h
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index 12d126dcc9c1b61cd82cee1313e07145ef08e207..2fa846e35a3ad42975ed83940c40a3d459c553f9 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -142,6 +142,21 @@ protected:
// 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_;
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698