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 <climits> | 7 #include <climits> |
8 | 8 |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/metrics/histogram_samples.h" | 13 #include "base/metrics/histogram_samples.h" |
14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
15 #include "base/pickle.h" | 15 #include "base/pickle.h" |
16 #include "base/process_util.h" | 16 #include "base/process/process_handle.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/values.h" | 18 #include "base/values.h" |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 | 21 |
22 std::string HistogramTypeToString(HistogramType type) { | 22 std::string HistogramTypeToString(HistogramType type) { |
23 switch(type) { | 23 switch(type) { |
24 case HISTOGRAM: | 24 case HISTOGRAM: |
25 return "HISTOGRAM"; | 25 return "HISTOGRAM"; |
26 case LINEAR_HISTOGRAM: | 26 case LINEAR_HISTOGRAM: |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return result; | 152 return result; |
153 } | 153 } |
154 | 154 |
155 void HistogramBase::WriteAsciiBucketValue(Count current, | 155 void HistogramBase::WriteAsciiBucketValue(Count current, |
156 double scaled_sum, | 156 double scaled_sum, |
157 std::string* output) const { | 157 std::string* output) const { |
158 StringAppendF(output, " (%d = %3.1f%%)", current, current/scaled_sum); | 158 StringAppendF(output, " (%d = %3.1f%%)", current, current/scaled_sum); |
159 } | 159 } |
160 | 160 |
161 } // namespace base | 161 } // namespace base |
OLD | NEW |