| 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 #ifndef CHROME_TEST_PERF_PERF_TEST_H_ | 5 #ifndef TESTING_PERF_PERF_TEST_H_ |
| 6 #define CHROME_TEST_PERF_PERF_TEST_H_ | 6 #define TESTING_PERF_PERF_TEST_H_ |
| 7 | 7 |
| 8 #include <stdio.h> | |
| 9 #include <string> | 8 #include <string> |
| 10 | 9 |
| 11 #include "chrome/test/base/chrome_process_util.h" | |
| 12 | |
| 13 namespace perf_test { | 10 namespace perf_test { |
| 14 | 11 |
| 15 // Prints numerical information to stdout in a controlled format, for | 12 // Prints numerical information to stdout in a controlled format, for |
| 16 // post-processing. |measurement| is a description of the quantity being | 13 // post-processing. |measurement| is a description of the quantity being |
| 17 // measured, e.g. "vm_peak"; |modifier| is provided as a convenience and | 14 // measured, e.g. "vm_peak"; |modifier| is provided as a convenience and |
| 18 // will be appended directly to the name of the |measurement|, e.g. | 15 // will be appended directly to the name of the |measurement|, e.g. |
| 19 // "_browser"; |trace| is a description of the particular data point, e.g. | 16 // "_browser"; |trace| is a description of the particular data point, e.g. |
| 20 // "reference"; |value| is the measured value; and |units| is a description | 17 // "reference"; |value| is the measured value; and |units| is a description |
| 21 // of the units of measure, e.g. "bytes". If |important| is true, the output | 18 // of the units of measure, e.g. "bytes". If |important| is true, the output |
| 22 // line will be specially marked, to notify the post-processor. The strings | 19 // line will be specially marked, to notify the post-processor. The strings |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool important); | 84 bool important); |
| 88 | 85 |
| 89 void AppendResultList(std::string& output, | 86 void AppendResultList(std::string& output, |
| 90 const std::string& measurement, | 87 const std::string& measurement, |
| 91 const std::string& modifier, | 88 const std::string& modifier, |
| 92 const std::string& trace, | 89 const std::string& trace, |
| 93 const std::string& values, | 90 const std::string& values, |
| 94 const std::string& units, | 91 const std::string& units, |
| 95 bool important); | 92 bool important); |
| 96 | 93 |
| 97 // Prints IO performance data for use by perf graphs. | |
| 98 void PrintIOPerfInfo(const std::string& test_name, | |
| 99 const ChromeProcessList& chrome_processes, | |
| 100 base::ProcessId browser_pid); | |
| 101 | |
| 102 void PrintIOPerfInfo(FILE* target, | |
| 103 const std::string& test_name, | |
| 104 const ChromeProcessList& chrome_processes, | |
| 105 base::ProcessId browser_pid); | |
| 106 | |
| 107 std::string IOPerfInfoToString(const std::string& test_name, | |
| 108 const ChromeProcessList& chrome_processes, | |
| 109 base::ProcessId browser_pid); | |
| 110 | |
| 111 // Prints memory usage data for use by perf graphs. | |
| 112 void PrintMemoryUsageInfo(const std::string& test_name, | |
| 113 const ChromeProcessList& chrome_processes, | |
| 114 base::ProcessId browser_pid); | |
| 115 | |
| 116 void PrintMemoryUsageInfo(FILE* target, | |
| 117 const std::string& test_name, | |
| 118 const ChromeProcessList& chrome_processes, | |
| 119 base::ProcessId browser_pid); | |
| 120 | |
| 121 std::string MemoryUsageInfoToString(const std::string& test_name, | |
| 122 const ChromeProcessList& chrome_processes, | |
| 123 base::ProcessId browser_pid); | |
| 124 | |
| 125 // Prints memory commit charge stats for use by perf graphs. | 94 // Prints memory commit charge stats for use by perf graphs. |
| 126 void PrintSystemCommitCharge(const std::string& test_name, | 95 void PrintSystemCommitCharge(const std::string& test_name, |
| 127 size_t charge, | 96 size_t charge, |
| 128 bool important); | 97 bool important); |
| 129 | 98 |
| 130 void PrintSystemCommitCharge(FILE* target, | 99 void PrintSystemCommitCharge(FILE* target, |
| 131 const std::string& test_name, | 100 const std::string& test_name, |
| 132 size_t charge, | 101 size_t charge, |
| 133 bool important); | 102 bool important); |
| 134 | 103 |
| 135 std::string SystemCommitChargeToString(const std::string& test_name, | 104 std::string SystemCommitChargeToString(const std::string& test_name, |
| 136 size_t charge, | 105 size_t charge, |
| 137 bool important); | 106 bool important); |
| 138 | 107 |
| 139 } // namespace perf_test | 108 } // namespace perf_test |
| 140 | 109 |
| 141 #endif // CHROME_TEST_PERF_PERF_TEST_H_ | 110 #endif // TESTING_PERF_PERF_TEST_H_ |
| OLD | NEW |