| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // See header file for details and examples. | 8 // See header file for details and examples. |
| 9 | 9 |
| 10 #include <architecture/i386/math.h> |
| 11 #include <limits.h> |
| 12 #include <stdbool.h> |
| 13 #include <stddef.h> |
| 14 #include <algorithm> |
| 15 #include <map> |
| 16 #include <string> |
| 17 #include <utility> |
| 18 #include <vector> |
| 19 |
| 20 #include "base/basictypes.h" |
| 21 #include "base/logging.h" |
| 10 #include "base/metrics/histogram.h" | 22 #include "base/metrics/histogram.h" |
| 11 | |
| 12 #include <math.h> | |
| 13 | |
| 14 #include <algorithm> | |
| 15 #include <string> | |
| 16 | |
| 17 #include "base/logging.h" | |
| 18 #include "base/pickle.h" | 23 #include "base/pickle.h" |
| 24 #include "base/ref_counted.h" |
| 19 #include "base/stringprintf.h" | 25 #include "base/stringprintf.h" |
| 20 #include "base/synchronization/lock.h" | 26 #include "base/synchronization/lock.h" |
| 27 #include "base/time.h" |
| 21 | 28 |
| 22 namespace base { | 29 namespace base { |
| 23 | 30 |
| 24 typedef Histogram::Count Count; | 31 typedef Histogram::Count Count; |
| 25 | 32 |
| 26 scoped_refptr<Histogram> Histogram::FactoryGet(const std::string& name, | 33 scoped_refptr<Histogram> Histogram::FactoryGet(const std::string& name, |
| 27 Sample minimum, Sample maximum, size_t bucket_count, Flags flags) { | 34 Sample minimum, Sample maximum, size_t bucket_count, Flags flags) { |
| 28 scoped_refptr<Histogram> histogram(NULL); | 35 scoped_refptr<Histogram> histogram(NULL); |
| 29 | 36 |
| 30 // Defensive code. | 37 // Defensive code. |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 } | 1050 } |
| 1044 | 1051 |
| 1045 // static | 1052 // static |
| 1046 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; | 1053 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; |
| 1047 // static | 1054 // static |
| 1048 base::Lock* StatisticsRecorder::lock_ = NULL; | 1055 base::Lock* StatisticsRecorder::lock_ = NULL; |
| 1049 // static | 1056 // static |
| 1050 bool StatisticsRecorder::dump_on_exit_ = false; | 1057 bool StatisticsRecorder::dump_on_exit_ = false; |
| 1051 | 1058 |
| 1052 } // namespace base | 1059 } // namespace base |
| OLD | NEW |