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

Side by Side Diff: third_party/WebKit/Source/platform/Histogram.h

Issue 1647883004: Support caching histograms so that a lookup isn't done in each iteration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove custom macro definition that wasn't required 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
OLDNEW
(Empty)
1 // Copyright 2016 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 Histogram_h
6 #define Histogram_h
7
8 #include "platform/PlatformExport.h"
9 #include <stdint.h>
10
11 namespace base {
12 class HistogramBase;
13 };
14
15 namespace blink {
16
17 class PLATFORM_EXPORT CustomCountHistogram {
18 public:
19 CustomCountHistogram(const char* name, int32_t min, int32_t max, int32_t buc ketCount);
20 void count(int32_t sample);
21
22 protected:
23 CustomCountHistogram(base::HistogramBase*);
esprehn 2016/02/01 16:35:08 explicit, note that even private and protected met
dtapuska 2016/02/01 16:43:31 Done.
24
25 private:
26 base::HistogramBase* m_histogram;
27 };
28
29 class PLATFORM_EXPORT EnumerationHistogram : public CustomCountHistogram {
30 public:
31 EnumerationHistogram(const char* name, int32_t boundaryValue);
32 };
33
34 class PLATFORM_EXPORT SparseHistogram {
35 public:
36 explicit SparseHistogram(const char* name);
37
38 void sample(int32_t sample);
39
40 private:
41 base::HistogramBase* m_histogram;
42 };
43
44 } // namespace blink
45
46 #endif // Histogram_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/DEPS ('k') | third_party/WebKit/Source/platform/Histogram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698