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 #include "base/metrics/histogram_base.h" | 5 #include "base/metrics/histogram_base.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/json/json_string_value_serializer.h" | 11 #include "base/json/json_string_value_serializer.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/metrics/histogram_persistence.h" | |
15 #include "base/metrics/histogram_samples.h" | 16 #include "base/metrics/histogram_samples.h" |
16 #include "base/metrics/sparse_histogram.h" | 17 #include "base/metrics/sparse_histogram.h" |
17 #include "base/metrics/statistics_recorder.h" | 18 #include "base/metrics/statistics_recorder.h" |
18 #include "base/pickle.h" | 19 #include "base/pickle.h" |
19 #include "base/process/process_handle.h" | 20 #include "base/process/process_handle.h" |
20 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "base/synchronization/lock.h" | |
Alexei Svitkine (slow)
2016/01/12 21:54:44
Doesn't seem like this header or the one on line 1
bcwhite
2016/01/13 13:38:29
Done.
| |
21 #include "base/values.h" | 23 #include "base/values.h" |
22 | 24 |
23 namespace base { | 25 namespace base { |
24 | 26 |
25 std::string HistogramTypeToString(HistogramType type) { | 27 std::string HistogramTypeToString(HistogramType type) { |
26 switch (type) { | 28 switch (type) { |
27 case HISTOGRAM: | 29 case HISTOGRAM: |
28 return "HISTOGRAM"; | 30 return "HISTOGRAM"; |
29 case LINEAR_HISTOGRAM: | 31 case LINEAR_HISTOGRAM: |
30 return "LINEAR_HISTOGRAM"; | 32 return "LINEAR_HISTOGRAM"; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 return result; | 159 return result; |
158 } | 160 } |
159 | 161 |
160 void HistogramBase::WriteAsciiBucketValue(Count current, | 162 void HistogramBase::WriteAsciiBucketValue(Count current, |
161 double scaled_sum, | 163 double scaled_sum, |
162 std::string* output) const { | 164 std::string* output) const { |
163 StringAppendF(output, " (%d = %3.1f%%)", current, current/scaled_sum); | 165 StringAppendF(output, " (%d = %3.1f%%)", current, current/scaled_sum); |
164 } | 166 } |
165 | 167 |
166 } // namespace base | 168 } // namespace base |
OLD | NEW |