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

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

Issue 2687583002: Add support for single sample metrics. (Closed)
Patch Set: Redesign! Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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_SINGLE_VALUE_HISTOGRAMS_H_
6 #define BASE_METRICS_SINGLE_VALUE_HISTOGRAMS_H_
7
8 #include "base/base_export.h"
9 #include "base/macros.h"
10 #include "base/metrics/histogram_base.h"
11
12 namespace base {
13
14 class BASE_EXPORT SingleValueCountsHistogram {
15 public:
16 virtual ~SingleValueCountsHistogram() {}
17
18 virtual void SetSample(base::HistogramBase::Sample sample) = 0;
19 };
20
21 class BASE_EXPORT SingleValueHistogramsFactory {
22 public:
23 virtual ~SingleValueHistogramsFactory() {}
24
25 static SingleValueHistogramsFactory* Get();
26 static void SetFactory(SingleValueHistogramsFactory* factory);
27
28 virtual std::unique_ptr<SingleValueCountsHistogram>
29 CreateSingleValueCountsHistogram(const std::string& name,
30 base::HistogramBase::Sample min,
31 base::HistogramBase::Sample max,
32 uint32_t bucket_count) = 0;
33 };
34
35 } // namespace base
36
37 #endif // BASE_METRICS_SINGLE_VALUE_HISTOGRAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698