OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "testing/perf/perf_test.h" | 5 #include "testing/perf/perf_test.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 PrintResultsImpl(measurement, | 56 PrintResultsImpl(measurement, |
57 modifier, | 57 modifier, |
58 trace, | 58 trace, |
59 base::UintToString(static_cast<unsigned int>(value)), | 59 base::UintToString(static_cast<unsigned int>(value)), |
60 std::string(), | 60 std::string(), |
61 std::string(), | 61 std::string(), |
62 units, | 62 units, |
63 important); | 63 important); |
64 } | 64 } |
65 | 65 |
| 66 void PrintResult(const std::string& measurement, |
| 67 const std::string& modifier, |
| 68 const std::string& trace, |
| 69 double value, |
| 70 const std::string& units, |
| 71 bool important) { |
| 72 PrintResultsImpl(measurement, |
| 73 modifier, |
| 74 trace, |
| 75 base::DoubleToString(value), |
| 76 std::string(), |
| 77 std::string(), |
| 78 units, |
| 79 important); |
| 80 } |
| 81 |
66 void AppendResult(std::string& output, | 82 void AppendResult(std::string& output, |
67 const std::string& measurement, | 83 const std::string& measurement, |
68 const std::string& modifier, | 84 const std::string& modifier, |
69 const std::string& trace, | 85 const std::string& trace, |
70 size_t value, | 86 size_t value, |
71 const std::string& units, | 87 const std::string& units, |
72 bool important) { | 88 bool important) { |
73 output += ResultsToString( | 89 output += ResultsToString( |
74 measurement, | 90 measurement, |
75 modifier, | 91 modifier, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 "commit_charge", | 195 "commit_charge", |
180 std::string(), | 196 std::string(), |
181 "cc" + trace_name, | 197 "cc" + trace_name, |
182 charge, | 198 charge, |
183 "kb", | 199 "kb", |
184 important); | 200 important); |
185 return output; | 201 return output; |
186 } | 202 } |
187 | 203 |
188 } // namespace perf_test | 204 } // namespace perf_test |
OLD | NEW |