diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 00:54:51 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 00:54:51 +0000 |
commit | 2b5ce8561b7c75c6939ccefc7e69ac778a87dd84 (patch) | |
tree | 8482103e2a0b4608c17af7ecb015e7eabc596820 /chrome_frame | |
parent | ddb0468394a7defc0bf8a198d087f4cda22a5063 (diff) | |
download | chromium_src-2b5ce8561b7c75c6939ccefc7e69ac778a87dd84.zip chromium_src-2b5ce8561b7c75c6939ccefc7e69ac778a87dd84.tar.gz chromium_src-2b5ce8561b7c75c6939ccefc7e69ac778a87dd84.tar.bz2 |
Move general UiPerfTest code to shared area in preparation for performance browser tests.
BUG=107745
Review URL: http://codereview.chromium.org/8971004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/test/perf/chrome_frame_perftest.cc | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc index 722bb19..06de343 100644 --- a/chrome_frame/test/perf/chrome_frame_perftest.cc +++ b/chrome_frame/test/perf/chrome_frame_perftest.cc @@ -30,6 +30,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" #include "chrome/test/base/chrome_process_util.h" +#include "chrome/test/perf/perf_test.h" #include "chrome/test/ui/ui_perf_test.h" #include "chrome_frame/chrome_tab.h" #include "chrome_frame/test_utils.h" @@ -345,7 +346,7 @@ class ChromeFrameStartupTest : public ChromeFramePerfTestBase { for (int i = 0; i < kNumCycles; ++i) base::StringAppendF(×, "%.2f,", timings[i].InMillisecondsF()); - PrintResultList(graph, "", trace, times, "ms", important); + perf_test::PrintResultList(graph, "", trace, times, "ms", important); } FilePath dir_app_; @@ -524,18 +525,14 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { ASSERT_TRUE(chrome_frame_memory_test_instance_ != NULL); if (chrome_browser_process_) { - chrome_frame_memory_test_instance_->PrintResult( - "vm_final_browser", "", trace_name + "_vm_b", + perf_test::PrintResult("vm_final_browser", "", trace_name + "_vm_b", virtual_size_ / 1024, "KB", false /* not important */); - chrome_frame_memory_test_instance_->PrintResult( - "ws_final_browser", "", trace_name + "_ws_b", + perf_test::PrintResult("ws_final_browser", "", trace_name + "_ws_b", working_set_size_ / 1024, "KB", false /* not important */); } else if (process_id_ == base::GetCurrentProcId()) { - chrome_frame_memory_test_instance_->PrintResult( - "vm_current_process", "", trace_name + "_vm_c", + perf_test::PrintResult("vm_current_process", "", trace_name + "_vm_c", virtual_size_ / 1024, "KB", false /* not important */); - chrome_frame_memory_test_instance_->PrintResult( - "ws_current_process", "", trace_name + "_ws_c", + perf_test::PrintResult("ws_current_process", "", trace_name + "_ws_c", working_set_size_ / 1024, "KB", false /* not important */); } @@ -650,8 +647,8 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { std::string trace_name(test_name); trace_name.append("_cc"); - PrintResult("commit_charge", "", trace_name, - commit_size / 1024, "KB", true /* important */); + perf_test::PrintResult("commit_charge", "", trace_name, + commit_size / 1024, "KB", true /* important */); printf("\n"); } @@ -705,12 +702,12 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { printf("\n"); - PrintResult("vm_final_total", "", trace_name + "_vm", - total_virtual_size / 1024, "KB", - false /* not important */); - PrintResult("ws_final_total", "", trace_name + "_ws", - total_working_set_size / 1024, "KB", - true /* important */); + perf_test::PrintResult("vm_final_total", "", trace_name + "_vm", + total_virtual_size / 1024, "KB", + false /* not important */); + perf_test::PrintResult("ws_final_total", "", trace_name + "_ws", + total_working_set_size / 1024, "KB", + true /* important */); } // Should never get called. |