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

Side by Side Diff: base/metrics/histogram_flattener.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « base/metrics/histogram_delta_serialization_unittest.cc ('k') | base/metrics/histogram_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_METRICS_HISTOGRAM_FLATTENER_H_
6 #define BASE_METRICS_HISTOGRAM_FLATTENER_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/metrics/histogram.h"
13
14 namespace base {
15
16 class HistogramSamples;
17
18 // HistogramFlattener is an interface used by HistogramSnapshotManager, which
19 // handles the logistics of gathering up available histograms for recording.
20 // The implementors handle the exact lower level recording mechanism, or
21 // error report mechanism.
22 class BASE_EXPORT HistogramFlattener {
23 public:
24 virtual void RecordDelta(const HistogramBase& histogram,
25 const HistogramSamples& snapshot) = 0;
26
27 // Will be called each time a type of Inconsistency is seen on a histogram,
28 // during inspections done internally in HistogramSnapshotManager class.
29 virtual void InconsistencyDetected(HistogramBase::Inconsistency problem) = 0;
30
31 // Will be called when a type of Inconsistency is seen for the first time on
32 // a histogram.
33 virtual void UniqueInconsistencyDetected(
34 HistogramBase::Inconsistency problem) = 0;
35
36 // Will be called when the total logged sample count of a histogram
37 // differs from the sum of logged sample count in all the buckets. The
38 // argument |amount| is the non-zero discrepancy.
39 virtual void InconsistencyDetectedInLoggedCount(int amount) = 0;
40
41 protected:
42 HistogramFlattener() {}
43 virtual ~HistogramFlattener() {}
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(HistogramFlattener);
47 };
48
49 } // namespace base
50
51 #endif // BASE_METRICS_HISTOGRAM_FLATTENER_H_
OLDNEW
« no previous file with comments | « base/metrics/histogram_delta_serialization_unittest.cc ('k') | base/metrics/histogram_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698