OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/histogram.h" | 10 #include "base/histogram.h" |
11 | 11 |
12 #include <math.h> | 12 #include <math.h> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/scoped_ptr.h" | |
17 #include "base/string_util.h" | 16 #include "base/string_util.h" |
18 | 17 |
19 using base::TimeDelta; | 18 using base::TimeDelta; |
20 | 19 |
21 typedef Histogram::Count Count; | 20 typedef Histogram::Count Count; |
22 | 21 |
23 // static | 22 // static |
24 const int Histogram::kHexRangePrintingFlag = 0x8000; | 23 const int Histogram::kHexRangePrintingFlag = 0x8000; |
25 | 24 |
26 Histogram::Histogram(const char* name, Sample minimum, | 25 Histogram::Histogram(const char* name, Sample minimum, |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 snapshot->push_back(it->second); | 790 snapshot->push_back(it->second); |
792 } | 791 } |
793 } | 792 } |
794 | 793 |
795 // static | 794 // static |
796 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; | 795 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; |
797 // static | 796 // static |
798 Lock* StatisticsRecorder::lock_ = NULL; | 797 Lock* StatisticsRecorder::lock_ = NULL; |
799 // static | 798 // static |
800 bool StatisticsRecorder::dump_on_exit_ = false; | 799 bool StatisticsRecorder::dump_on_exit_ = false; |
OLD | NEW |