| Index: chrome/test/perf/perf_test.cc
|
| diff --git a/chrome/test/perf/perf_test.cc b/chrome/test/perf/perf_test.cc
|
| index 68c92e192dee7d04bd47818e5da350042b94776e..ec1d214c4a64377079c2956cc30bc7b61026a316 100644
|
| --- a/chrome/test/perf/perf_test.cc
|
| +++ b/chrome/test/perf/perf_test.cc
|
| @@ -54,8 +54,14 @@ void PrintResult(const std::string& measurement,
|
| size_t value,
|
| const std::string& units,
|
| bool important) {
|
| - PrintResultsImpl(measurement, modifier, trace, base::UintToString(value),
|
| - "", "", units, important);
|
| + PrintResultsImpl(measurement,
|
| + modifier,
|
| + trace,
|
| + base::UintToString(value),
|
| + std::string(),
|
| + std::string(),
|
| + units,
|
| + important);
|
| }
|
|
|
| void AppendResult(std::string& output,
|
| @@ -65,9 +71,14 @@ 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),
|
| - "", "", units, important);
|
| + std::string(),
|
| + std::string(),
|
| + units,
|
| + important);
|
| }
|
|
|
| void PrintResult(const std::string& measurement,
|
| @@ -76,7 +87,13 @@ void PrintResult(const std::string& measurement,
|
| const std::string& value,
|
| const std::string& units,
|
| bool important) {
|
| - PrintResultsImpl(measurement, modifier, trace, value, "", "", units,
|
| + PrintResultsImpl(measurement,
|
| + modifier,
|
| + trace,
|
| + value,
|
| + std::string(),
|
| + std::string(),
|
| + units,
|
| important);
|
| }
|
|
|
| @@ -87,7 +104,13 @@ void AppendResult(std::string& output,
|
| const std::string& value,
|
| const std::string& units,
|
| bool important) {
|
| - output += ResultsToString(measurement, modifier, trace, value, "", "", units,
|
| + output += ResultsToString(measurement,
|
| + modifier,
|
| + trace,
|
| + value,
|
| + std::string(),
|
| + std::string(),
|
| + units,
|
| important);
|
| }
|
|
|
| @@ -233,40 +256,120 @@ std::string IOPerfInfoToString(const std::string& test_name,
|
| }
|
|
|
| std::string t_name(test_name);
|
| - AppendResult(output, "read_op_b", "", "r_op_b" + t_name, read_op_b, "ops",
|
| + AppendResult(output,
|
| + "read_op_b",
|
| + std::string(),
|
| + "r_op_b" + t_name,
|
| + read_op_b,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "write_op_b", "", "w_op_b" + t_name, write_op_b, "ops",
|
| + AppendResult(output,
|
| + "write_op_b",
|
| + std::string(),
|
| + "w_op_b" + t_name,
|
| + write_op_b,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "other_op_b", "", "o_op_b" + t_name, other_op_b, "ops",
|
| + AppendResult(output,
|
| + "other_op_b",
|
| + std::string(),
|
| + "o_op_b" + t_name,
|
| + other_op_b,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "total_op_b", "", "IO_op_b" + t_name, total_op_b, "ops",
|
| + AppendResult(output,
|
| + "total_op_b",
|
| + std::string(),
|
| + "IO_op_b" + t_name,
|
| + total_op_b,
|
| + "ops",
|
| false);
|
|
|
| - AppendResult(output, "read_byte_b", "", "r_b" + t_name, read_byte_b, "kb",
|
| + AppendResult(output,
|
| + "read_byte_b",
|
| + std::string(),
|
| + "r_b" + t_name,
|
| + read_byte_b,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "write_byte_b", "", "w_b" + t_name, write_byte_b, "kb",
|
| + AppendResult(output,
|
| + "write_byte_b",
|
| + std::string(),
|
| + "w_b" + t_name,
|
| + write_byte_b,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "other_byte_b", "", "o_b" + t_name, other_byte_b, "kb",
|
| + AppendResult(output,
|
| + "other_byte_b",
|
| + std::string(),
|
| + "o_b" + t_name,
|
| + other_byte_b,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "total_byte_b", "", "IO_b" + t_name, total_byte_b, "kb",
|
| + AppendResult(output,
|
| + "total_byte_b",
|
| + std::string(),
|
| + "IO_b" + t_name,
|
| + total_byte_b,
|
| + "kb",
|
| false);
|
|
|
| - AppendResult(output, "read_op_r", "", "r_op_r" + t_name, read_op_r, "ops",
|
| + AppendResult(output,
|
| + "read_op_r",
|
| + std::string(),
|
| + "r_op_r" + t_name,
|
| + read_op_r,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "write_op_r", "", "w_op_r" + t_name, write_op_r, "ops",
|
| + AppendResult(output,
|
| + "write_op_r",
|
| + std::string(),
|
| + "w_op_r" + t_name,
|
| + write_op_r,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "other_op_r", "", "o_op_r" + t_name, other_op_r, "ops",
|
| + AppendResult(output,
|
| + "other_op_r",
|
| + std::string(),
|
| + "o_op_r" + t_name,
|
| + other_op_r,
|
| + "ops",
|
| false);
|
| - AppendResult(output, "total_op_r", "", "IO_op_r" + t_name, total_op_r, "ops",
|
| + AppendResult(output,
|
| + "total_op_r",
|
| + std::string(),
|
| + "IO_op_r" + t_name,
|
| + total_op_r,
|
| + "ops",
|
| false);
|
|
|
| - AppendResult(output, "read_byte_r", "", "r_r" + t_name, read_byte_r, "kb",
|
| + AppendResult(output,
|
| + "read_byte_r",
|
| + std::string(),
|
| + "r_r" + t_name,
|
| + read_byte_r,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "write_byte_r", "", "w_r" + t_name, write_byte_r, "kb",
|
| + AppendResult(output,
|
| + "write_byte_r",
|
| + std::string(),
|
| + "w_r" + t_name,
|
| + write_byte_r,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "other_byte_r", "", "o_r" + t_name, other_byte_r, "kb",
|
| + AppendResult(output,
|
| + "other_byte_r",
|
| + std::string(),
|
| + "o_r" + t_name,
|
| + other_byte_r,
|
| + "kb",
|
| false);
|
| - AppendResult(output, "total_byte_r", "", "IO_r" + t_name, total_byte_r, "kb",
|
| + AppendResult(output,
|
| + "total_byte_r",
|
| + std::string(),
|
| + "IO_r" + t_name,
|
| + total_byte_r,
|
| + "kb",
|
| false);
|
|
|
| return output;
|
| @@ -392,29 +495,57 @@ 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", "", "vm_size_f_b" + trace_name,
|
| - browser_virtual_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_size_final_b",
|
| + std::string(),
|
| + "vm_size_f_b" + trace_name,
|
| + browser_virtual_size,
|
| + "bytes",
|
| false /* not important */);
|
| - AppendResult(output, "vm_rss_final_b", "", "vm_rss_f_b" + trace_name,
|
| - browser_working_set_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_rss_final_b",
|
| + std::string(),
|
| + "vm_rss_f_b" + trace_name,
|
| + browser_working_set_size,
|
| + "bytes",
|
| false /* not important */);
|
| - AppendResult(output, "vm_size_final_r", "", "vm_size_f_r" + trace_name,
|
| - renderer_virtual_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_size_final_r",
|
| + std::string(),
|
| + "vm_size_f_r" + trace_name,
|
| + renderer_virtual_size,
|
| + "bytes",
|
| false /* not important */);
|
| - AppendResult(output, "vm_rss_final_r", "", "vm_rss_f_r" + trace_name,
|
| - renderer_working_set_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_rss_final_r",
|
| + std::string(),
|
| + "vm_rss_f_r" + trace_name,
|
| + renderer_working_set_size,
|
| + "bytes",
|
| false /* not important */);
|
| - AppendResult(output, "vm_size_final_t", "", "vm_size_f_t" + trace_name,
|
| - total_virtual_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_size_final_t",
|
| + std::string(),
|
| + "vm_size_f_t" + trace_name,
|
| + total_virtual_size,
|
| + "bytes",
|
| false /* not important */);
|
| - AppendResult(output, "vm_rss_final_t", "", "vm_rss_f_t" + trace_name,
|
| - total_working_set_size, "bytes",
|
| + AppendResult(output,
|
| + "vm_rss_final_t",
|
| + std::string(),
|
| + "vm_rss_f_t" + trace_name,
|
| + total_working_set_size,
|
| + "bytes",
|
| false /* not important */);
|
| #else
|
| NOTIMPLEMENTED();
|
| #endif
|
| - AppendResult(output, "processes", "", "proc_" + trace_name,
|
| - chrome_processes.size(), "count",
|
| + AppendResult(output,
|
| + "processes",
|
| + std::string(),
|
| + "proc_" + trace_name,
|
| + chrome_processes.size(),
|
| + "count",
|
| false /* not important */);
|
|
|
| return output;
|
| @@ -439,7 +570,12 @@ std::string SystemCommitChargeToString(const std::string& test_name,
|
| bool important) {
|
| std::string trace_name(test_name);
|
| std::string output;
|
| - AppendResult(output, "commit_charge", "", "cc" + trace_name, charge, "kb",
|
| + AppendResult(output,
|
| + "commit_charge",
|
| + std::string(),
|
| + "cc" + trace_name,
|
| + charge,
|
| + "kb",
|
| important);
|
| return output;
|
| }
|
|
|