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

Unified Diff: base/metrics/histogram_base.h

Issue 1485763002: Merge multiple histogram snapshots into single one for reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: addressed remaining review comments by Alexei Created 4 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 40c2caedc313a815c6400b9893feb093c1a6d676..6817629bf8c080dd9a3fe259d96ff586c7ccebc2 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -94,14 +94,18 @@ class BASE_EXPORT HistogramBase {
};
// Histogram data inconsistency types.
- enum Inconsistency {
+ enum Inconsistency : uint32_t {
NO_INCONSISTENCIES = 0x0,
RANGE_CHECKSUM_ERROR = 0x1,
BUCKET_ORDER_ERROR = 0x2,
COUNT_HIGH_ERROR = 0x4,
COUNT_LOW_ERROR = 0x8,
- NEVER_EXCEEDED_VALUE = 0x10
+ NEVER_EXCEEDED_VALUE = 0x10,
+
+ // This value is used only in HistogramSnapshotManager for marking
+ // internally when new inconsistencies are found.
+ NEW_INCONSISTENCY_FOUND = 0x8000000
};
explicit HistogramBase(const std::string& name);
@@ -154,12 +158,17 @@ class BASE_EXPORT HistogramBase {
// Try to find out data corruption from histogram and the samples.
// The returned value is a combination of Inconsistency enum.
- virtual int FindCorruption(const HistogramSamples& samples) const;
+ virtual uint32_t FindCorruption(const HistogramSamples& samples) const;
// Snapshot the current complete set of sample data.
// Override with atomic/locked snapshot if needed.
virtual scoped_ptr<HistogramSamples> SnapshotSamples() const = 0;
+ // Calculate the change (delta) in histogram counts since the previous call
+ // to this method. Each successive call will return only those counts
+ // changed since the last call.
+ virtual scoped_ptr<HistogramSamples> SnapshotDelta() = 0;
+
// The following methods provide graphical histogram displays.
virtual void WriteHTMLGraph(std::string* output) const = 0;
virtual void WriteAscii(std::string* output) 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