summaryrefslogtreecommitdiffstats
path: root/chrome/test/perf/perf_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/perf/perf_test.cc')
-rw-r--r--chrome/test/perf/perf_test.cc210
1 files changed, 37 insertions, 173 deletions
diff --git a/chrome/test/perf/perf_test.cc b/chrome/test/perf/perf_test.cc
index ec1d214..68c92e1 100644
--- a/chrome/test/perf/perf_test.cc
+++ b/chrome/test/perf/perf_test.cc
@@ -54,14 +54,8 @@ void PrintResult(const std::string& measurement,
size_t value,
const std::string& units,
bool important) {
- PrintResultsImpl(measurement,
- modifier,
- trace,
- base::UintToString(value),
- std::string(),
- std::string(),
- units,
- important);
+ PrintResultsImpl(measurement, modifier, trace, base::UintToString(value),
+ "", "", units, important);
}
void AppendResult(std::string& output,
@@ -71,14 +65,9 @@ void AppendResult(std::string& output,
size_t value,
const std::string& units,
bool important) {
- output += ResultsToString(measurement,
- modifier,
- trace,
+ output += ResultsToString(measurement, modifier, trace,
base::UintToString(value),
- std::string(),
- std::string(),
- units,
- important);
+ "", "", units, important);
}
void PrintResult(const std::string& measurement,
@@ -87,13 +76,7 @@ void PrintResult(const std::string& measurement,
const std::string& value,
const std::string& units,
bool important) {
- PrintResultsImpl(measurement,
- modifier,
- trace,
- value,
- std::string(),
- std::string(),
- units,
+ PrintResultsImpl(measurement, modifier, trace, value, "", "", units,
important);
}
@@ -104,13 +87,7 @@ void AppendResult(std::string& output,
const std::string& value,
const std::string& units,
bool important) {
- output += ResultsToString(measurement,
- modifier,
- trace,
- value,
- std::string(),
- std::string(),
- units,
+ output += ResultsToString(measurement, modifier, trace, value, "", "", units,
important);
}
@@ -256,120 +233,40 @@ std::string IOPerfInfoToString(const std::string& test_name,
}
std::string t_name(test_name);
- AppendResult(output,
- "read_op_b",
- std::string(),
- "r_op_b" + t_name,
- read_op_b,
- "ops",
+ AppendResult(output, "read_op_b", "", "r_op_b" + t_name, read_op_b, "ops",
false);
- AppendResult(output,
- "write_op_b",
- std::string(),
- "w_op_b" + t_name,
- write_op_b,
- "ops",
+ AppendResult(output, "write_op_b", "", "w_op_b" + t_name, write_op_b, "ops",
false);
- AppendResult(output,
- "other_op_b",
- std::string(),
- "o_op_b" + t_name,
- other_op_b,
- "ops",
+ AppendResult(output, "other_op_b", "", "o_op_b" + t_name, other_op_b, "ops",
false);
- AppendResult(output,
- "total_op_b",
- std::string(),
- "IO_op_b" + t_name,
- total_op_b,
- "ops",
+ AppendResult(output, "total_op_b", "", "IO_op_b" + t_name, total_op_b, "ops",
false);
- AppendResult(output,
- "read_byte_b",
- std::string(),
- "r_b" + t_name,
- read_byte_b,
- "kb",
+ AppendResult(output, "read_byte_b", "", "r_b" + t_name, read_byte_b, "kb",
false);
- AppendResult(output,
- "write_byte_b",
- std::string(),
- "w_b" + t_name,
- write_byte_b,
- "kb",
+ AppendResult(output, "write_byte_b", "", "w_b" + t_name, write_byte_b, "kb",
false);
- AppendResult(output,
- "other_byte_b",
- std::string(),
- "o_b" + t_name,
- other_byte_b,
- "kb",
+ AppendResult(output, "other_byte_b", "", "o_b" + t_name, other_byte_b, "kb",
false);
- AppendResult(output,
- "total_byte_b",
- std::string(),
- "IO_b" + t_name,
- total_byte_b,
- "kb",
+ AppendResult(output, "total_byte_b", "", "IO_b" + t_name, total_byte_b, "kb",
false);
- AppendResult(output,
- "read_op_r",
- std::string(),
- "r_op_r" + t_name,
- read_op_r,
- "ops",
+ AppendResult(output, "read_op_r", "", "r_op_r" + t_name, read_op_r, "ops",
false);
- AppendResult(output,
- "write_op_r",
- std::string(),
- "w_op_r" + t_name,
- write_op_r,
- "ops",
+ AppendResult(output, "write_op_r", "", "w_op_r" + t_name, write_op_r, "ops",
false);
- AppendResult(output,
- "other_op_r",
- std::string(),
- "o_op_r" + t_name,
- other_op_r,
- "ops",
+ AppendResult(output, "other_op_r", "", "o_op_r" + t_name, other_op_r, "ops",
false);
- AppendResult(output,
- "total_op_r",
- std::string(),
- "IO_op_r" + t_name,
- total_op_r,
- "ops",
+ AppendResult(output, "total_op_r", "", "IO_op_r" + t_name, total_op_r, "ops",
false);
- AppendResult(output,
- "read_byte_r",
- std::string(),
- "r_r" + t_name,
- read_byte_r,
- "kb",
+ AppendResult(output, "read_byte_r", "", "r_r" + t_name, read_byte_r, "kb",
false);
- AppendResult(output,
- "write_byte_r",
- std::string(),
- "w_r" + t_name,
- write_byte_r,
- "kb",
+ AppendResult(output, "write_byte_r", "", "w_r" + t_name, write_byte_r, "kb",
false);
- AppendResult(output,
- "other_byte_r",
- std::string(),
- "o_r" + t_name,
- other_byte_r,
- "kb",
+ AppendResult(output, "other_byte_r", "", "o_r" + t_name, other_byte_r, "kb",
false);
- AppendResult(output,
- "total_byte_r",
- std::string(),
- "IO_r" + t_name,
- total_byte_r,
- "kb",
+ AppendResult(output, "total_byte_r", "", "IO_r" + t_name, total_byte_r, "kb",
false);
return output;
@@ -495,57 +392,29 @@ std::string MemoryUsageInfoToString(const std::string& test_name,
total_working_set_size, "bytes",
false /* not important */);
#elif defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_ANDROID)
- AppendResult(output,
- "vm_size_final_b",
- std::string(),
- "vm_size_f_b" + trace_name,
- browser_virtual_size,
- "bytes",
+ AppendResult(output, "vm_size_final_b", "", "vm_size_f_b" + trace_name,
+ browser_virtual_size, "bytes",
false /* not important */);
- AppendResult(output,
- "vm_rss_final_b",
- std::string(),
- "vm_rss_f_b" + trace_name,
- browser_working_set_size,
- "bytes",
+ AppendResult(output, "vm_rss_final_b", "", "vm_rss_f_b" + trace_name,
+ browser_working_set_size, "bytes",
false /* not important */);
- AppendResult(output,
- "vm_size_final_r",
- std::string(),
- "vm_size_f_r" + trace_name,
- renderer_virtual_size,
- "bytes",
+ AppendResult(output, "vm_size_final_r", "", "vm_size_f_r" + trace_name,
+ renderer_virtual_size, "bytes",
false /* not important */);
- AppendResult(output,
- "vm_rss_final_r",
- std::string(),
- "vm_rss_f_r" + trace_name,
- renderer_working_set_size,
- "bytes",
+ AppendResult(output, "vm_rss_final_r", "", "vm_rss_f_r" + trace_name,
+ renderer_working_set_size, "bytes",
false /* not important */);
- AppendResult(output,
- "vm_size_final_t",
- std::string(),
- "vm_size_f_t" + trace_name,
- total_virtual_size,
- "bytes",
+ AppendResult(output, "vm_size_final_t", "", "vm_size_f_t" + trace_name,
+ total_virtual_size, "bytes",
false /* not important */);
- AppendResult(output,
- "vm_rss_final_t",
- std::string(),
- "vm_rss_f_t" + trace_name,
- total_working_set_size,
- "bytes",
+ AppendResult(output, "vm_rss_final_t", "", "vm_rss_f_t" + trace_name,
+ total_working_set_size, "bytes",
false /* not important */);
#else
NOTIMPLEMENTED();
#endif
- AppendResult(output,
- "processes",
- std::string(),
- "proc_" + trace_name,
- chrome_processes.size(),
- "count",
+ AppendResult(output, "processes", "", "proc_" + trace_name,
+ chrome_processes.size(), "count",
false /* not important */);
return output;
@@ -570,12 +439,7 @@ std::string SystemCommitChargeToString(const std::string& test_name,
bool important) {
std::string trace_name(test_name);
std::string output;
- AppendResult(output,
- "commit_charge",
- std::string(),
- "cc" + trace_name,
- charge,
- "kb",
+ AppendResult(output, "commit_charge", "", "cc" + trace_name, charge, "kb",
important);
return output;
}