| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // Histogram is an object that aggregates statistics, and can summarize them in | 5 // Histogram is an object that aggregates statistics, and can summarize them in |
| 6 // various forms, including ASCII graphical, HTML, and numerically (as a | 6 // various forms, including ASCII graphical, HTML, and numerically (as a |
| 7 // vector of numbers corresponding to each of the aggregating buckets). | 7 // vector of numbers corresponding to each of the aggregating buckets). |
| 8 | 8 |
| 9 // It supports calls to accumulate either time intervals (which are processed | 9 // It supports calls to accumulate either time intervals (which are processed |
| 10 // as integral number of milliseconds), or arbitrary integral units. | 10 // as integral number of milliseconds), or arbitrary integral units. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // pointer to a histogram. This static is explicitly initialized on any thread | 32 // pointer to a histogram. This static is explicitly initialized on any thread |
| 33 // that detects a uninitialized (NULL) pointer. The potentially racy | 33 // that detects a uninitialized (NULL) pointer. The potentially racy |
| 34 // initialization is not a problem as it is always set to point to the same | 34 // initialization is not a problem as it is always set to point to the same |
| 35 // value (i.e., the FactoryGet always returns the same value). FactoryGet | 35 // value (i.e., the FactoryGet always returns the same value). FactoryGet |
| 36 // is also completely thread safe, which results in a completely thread safe, | 36 // is also completely thread safe, which results in a completely thread safe, |
| 37 // and relatively fast, set of counters. To avoid races at shutdown, the static | 37 // and relatively fast, set of counters. To avoid races at shutdown, the static |
| 38 // pointer is NOT deleted, and we leak the histograms at process termination. | 38 // pointer is NOT deleted, and we leak the histograms at process termination. |
| 39 | 39 |
| 40 #ifndef BASE_METRICS_HISTOGRAM_H_ | 40 #ifndef BASE_METRICS_HISTOGRAM_H_ |
| 41 #define BASE_METRICS_HISTOGRAM_H_ | 41 #define BASE_METRICS_HISTOGRAM_H_ |
| 42 #pragma once | |
| 43 | 42 |
| 44 #include <list> | 43 #include <list> |
| 45 #include <map> | 44 #include <map> |
| 46 #include <string> | 45 #include <string> |
| 47 #include <vector> | 46 #include <vector> |
| 48 | 47 |
| 49 #include "base/atomicops.h" | 48 #include "base/atomicops.h" |
| 50 #include "base/base_export.h" | 49 #include "base/base_export.h" |
| 51 #include "base/compiler_specific.h" | 50 #include "base/compiler_specific.h" |
| 52 #include "base/gtest_prod_util.h" | 51 #include "base/gtest_prod_util.h" |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 // of our data, and to quickly see if some other CachedRanges instance is | 892 // of our data, and to quickly see if some other CachedRanges instance is |
| 894 // possibly Equal() to this instance. | 893 // possibly Equal() to this instance. |
| 895 uint32 range_checksum_; | 894 uint32 range_checksum_; |
| 896 | 895 |
| 897 DISALLOW_COPY_AND_ASSIGN(CachedRanges); | 896 DISALLOW_COPY_AND_ASSIGN(CachedRanges); |
| 898 }; | 897 }; |
| 899 | 898 |
| 900 } // namespace base | 899 } // namespace base |
| 901 | 900 |
| 902 #endif // BASE_METRICS_HISTOGRAM_H_ | 901 #endif // BASE_METRICS_HISTOGRAM_H_ |
| OLD | NEW |