OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 BASE_METRICS_STATS_COUNTERS_H_ | 5 #ifndef BASE_METRICS_STATS_COUNTERS_H_ |
6 #define BASE_METRICS_STATS_COUNTERS_H_ | 6 #define BASE_METRICS_STATS_COUNTERS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/metrics/stats_table.h" | 12 #include "base/metrics/stats_table.h" |
13 #include "base/time.h" | 13 #include "base/time/time.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 | 16 |
17 // StatsCounters are dynamically created values which can be tracked in | 17 // StatsCounters are dynamically created values which can be tracked in |
18 // the StatsTable. They are designed to be lightweight to create and | 18 // the StatsTable. They are designed to be lightweight to create and |
19 // easy to use. | 19 // easy to use. |
20 // | 20 // |
21 // Since StatsCounters can be created dynamically by name, there is | 21 // Since StatsCounters can be created dynamically by name, there is |
22 // a hash table lookup to find the counter in the table. A StatsCounter | 22 // a hash table lookup to find the counter in the table. A StatsCounter |
23 // object can be created once and used across multiple threads safely. | 23 // object can be created once and used across multiple threads safely. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 timer_.Stop(); | 188 timer_.Stop(); |
189 } | 189 } |
190 | 190 |
191 private: | 191 private: |
192 T& timer_; | 192 T& timer_; |
193 }; | 193 }; |
194 | 194 |
195 } // namespace base | 195 } // namespace base |
196 | 196 |
197 #endif // BASE_METRICS_STATS_COUNTERS_H_ | 197 #endif // BASE_METRICS_STATS_COUNTERS_H_ |
OLD | NEW |