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

Side by Side Diff: cc/base/histograms.h

Issue 2498703002: Increase Max Range for RasterPixelsPerMs (Closed)
Patch Set: fix histogram name Created 4 years 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 | « no previous file | cc/tiles/tile_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BASE_HISTOGRAMS_H_ 5 #ifndef CC_BASE_HISTOGRAMS_H_
6 #define CC_BASE_HISTOGRAMS_H_ 6 #define CC_BASE_HISTOGRAMS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/histogram_base.h" 10 #include "base/metrics/histogram_base.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class_name::~class_name() { \ 57 class_name::~class_name() { \
58 Sample time_sample; \ 58 Sample time_sample; \
59 Sample area_sample; \ 59 Sample area_sample; \
60 const char* client_name = GetClientNameForMetrics(); \ 60 const char* client_name = GetClientNameForMetrics(); \
61 if (client_name && GetHistogramValues(&time_sample, &area_sample)) { \ 61 if (client_name && GetHistogramValues(&time_sample, &area_sample)) { \
62 /* GetClientNameForMetrics only returns one non-null value over */ \ 62 /* GetClientNameForMetrics only returns one non-null value over */ \
63 /* the lifetime of the process, so these histogram names are */ \ 63 /* the lifetime of the process, so these histogram names are */ \
64 /* runtime constant. */ \ 64 /* runtime constant. */ \
65 UMA_HISTOGRAM_COUNTS(base::StringPrintf(time_histogram, client_name), \ 65 UMA_HISTOGRAM_COUNTS(base::StringPrintf(time_histogram, client_name), \
66 time_sample); \ 66 time_sample); \
67 UMA_HISTOGRAM_COUNTS(base::StringPrintf(area_histogram, client_name), \ 67 UMA_HISTOGRAM_CUSTOM_COUNTS( \
68 area_sample); \ 68 base::StringPrintf(area_histogram, client_name), area_sample, 1, \
69 100000000, 50); \
69 } \ 70 } \
70 } 71 }
71 72
72 // Version of the above macro for cases which only care about time, not area. 73 // Version of the above macro for cases which only care about time, not area.
73 #define DEFINE_SCOPED_UMA_HISTOGRAM_TIMER(class_name, time_histogram) \ 74 #define DEFINE_SCOPED_UMA_HISTOGRAM_TIMER(class_name, time_histogram) \
74 class class_name : public ScopedUMAHistogramAreaTimerBase { \ 75 class class_name : public ScopedUMAHistogramAreaTimerBase { \
75 public: \ 76 public: \
76 ~class_name(); \ 77 ~class_name(); \
77 }; \ 78 }; \
78 class_name::~class_name() { \ 79 class_name::~class_name() { \
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 base::ElapsedTimer timer_; 114 base::ElapsedTimer timer_;
114 base::CheckedNumeric<int> area_; 115 base::CheckedNumeric<int> area_;
115 116
116 friend class ScopedUMAHistogramAreaTimerBaseTest; 117 friend class ScopedUMAHistogramAreaTimerBaseTest;
117 DISALLOW_COPY_AND_ASSIGN(ScopedUMAHistogramAreaTimerBase); 118 DISALLOW_COPY_AND_ASSIGN(ScopedUMAHistogramAreaTimerBase);
118 }; 119 };
119 120
120 } // namespace cc 121 } // namespace cc
121 122
122 #endif // CC_BASE_HISTOGRAMS_H_ 123 #endif // CC_BASE_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698