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

Unified Diff: base/metrics/histogram_base.h

Issue 12207058: Connect SparseHistogram with the rest of stats system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux compiling Created 7 years, 10 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 729670cf98699e9af4a3215b6494cc62cdd515d0..e4cff7e7947ad3e404045452516c8f527bd259dd 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -48,6 +48,17 @@ BASE_EXPORT void DeserializeHistogramAndAddSamples(PickleIterator* iter);
////////////////////////////////////////////////////////////////////////////////
+// Histogram data inconsistency types.
+enum BASE_EXPORT HistogramInconsistency {
+ NO_INCONSISTENCIES = 0x0,
+ RANGE_CHECKSUM_ERROR = 0x1,
+ BUCKET_ORDER_ERROR = 0x2,
+ COUNT_HIGH_ERROR = 0x4,
+ COUNT_LOW_ERROR = 0x8,
+
+ NEVER_EXCEEDED_VALUE = 0x10
+};
+
class BASE_EXPORT HistogramBase {
public:
typedef int Sample; // Used for samples.
@@ -103,6 +114,10 @@ class BASE_EXPORT HistogramBase {
// does not serialize the samples.
bool SerializeInfo(Pickle* pickle) const;
+ // Try to find out data corruption from histogram and the samples.
+ // The returned value is a combination of HistogramInconsistency enum.
+ virtual int32 FindCorruption(const HistogramSamples& samples) const;
jar (doing other things) 2013/02/27 23:51:38 nit: I see why you made it an integral return type
kaiwang 2013/02/28 04:58:05 Done.
+
// Snapshot the current complete set of sample data.
// Override with atomic/locked snapshot if needed.
virtual scoped_ptr<HistogramSamples> SnapshotSamples() const = 0;
« 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