Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: chrome_frame/test/perf/chrome_frame_perftest.cc

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: windows fixes Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome_frame/test/perf/chrome_frame_perftest.h" 4 #include "chrome_frame/test/perf/chrome_frame_perftest.h"
5 5
6 #include <atlwin.h> 6 #include <atlwin.h>
7 #include <atlhost.h> 7 #include <atlhost.h>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 #include <string> 10 #include <string>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 virtual void SetUp() { 290 virtual void SetUp() {
291 ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir_app_)); 291 ASSERT_TRUE(PathService::Get(chrome::DIR_APP, &dir_app_));
292 292
293 chrome_dll_ = dir_app_.Append(FILE_PATH_LITERAL("chrome.dll")); 293 chrome_dll_ = dir_app_.Append(FILE_PATH_LITERAL("chrome.dll"));
294 chrome_exe_ = dir_app_.Append( 294 chrome_exe_ = dir_app_.Append(
295 FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName)); 295 FilePath::FromWStringHack(chrome::kBrowserProcessExecutableName));
296 chrome_frame_dll_ = dir_app_.Append(FILE_PATH_LITERAL("servers")); 296 chrome_frame_dll_ = dir_app_.Append(FILE_PATH_LITERAL("servers"));
297 chrome_frame_dll_ = chrome_frame_dll_.Append( 297 chrome_frame_dll_ = chrome_frame_dll_.Append(
298 FilePath::FromWStringHack(kChromeFrameDllName)); 298 FilePath::FromWStringHack(kChromeFrameDllName));
299 icu_dll_ = dir_app_.Append(FILE_PATH_LITERAL("icudt.dll")); 299 icu_dll_ = dir_app_.Append(FILE_PATH_LITERAL("icudt46.dll"));
300 gears_dll_ = dir_app_.Append(FILE_PATH_LITERAL("gears.dll"));
301 avcodec52_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avcodec-52.dll")); 300 avcodec52_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avcodec-52.dll"));
302 avformat52_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avformat-52.dll")); 301 avformat52_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avformat-52.dll"));
303 avutil50_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avutil-50.dll")); 302 avutil50_dll_ = dir_app_.Append(FILE_PATH_LITERAL("avutil-50.dll"));
304 } 303 }
305 304
306 // TODO(iyengar) 305 // TODO(iyengar)
307 // This function is similar to the RunStartupTest function used in chrome 306 // This function is similar to the RunStartupTest function used in chrome
308 // startup tests. Refactor into a common implementation. 307 // startup tests. Refactor into a common implementation.
309 void RunStartupTest(const char* graph, const char* trace, 308 void RunStartupTest(const char* graph, const char* trace,
310 const char* startup_url, bool test_cold, 309 const char* startup_url, bool test_cold,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 base::StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF()); 350 base::StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF());
352 351
353 PrintResultList(graph, "", trace, times, "ms", important); 352 PrintResultList(graph, "", trace, times, "ms", important);
354 } 353 }
355 354
356 FilePath dir_app_; 355 FilePath dir_app_;
357 FilePath chrome_dll_; 356 FilePath chrome_dll_;
358 FilePath chrome_exe_; 357 FilePath chrome_exe_;
359 FilePath chrome_frame_dll_; 358 FilePath chrome_frame_dll_;
360 FilePath icu_dll_; 359 FilePath icu_dll_;
361 FilePath gears_dll_;
362 FilePath avcodec52_dll_; 360 FilePath avcodec52_dll_;
363 FilePath avformat52_dll_; 361 FilePath avformat52_dll_;
364 FilePath avutil50_dll_; 362 FilePath avutil50_dll_;
365 363
366 protected: 364 protected:
367 // Individual startup tests should implement this function. 365 // Individual startup tests should implement this function.
368 virtual void RunStartupTestImpl(TimeTicks* start_time, 366 virtual void RunStartupTestImpl(TimeTicks* start_time,
369 TimeTicks* end_time) {} 367 TimeTicks* end_time) {}
370 368
371 // The host is torn down by this function. It should not be used after 369 // The host is torn down by this function. It should not be used after
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 true /* important */, false); 958 true /* important */, false);
961 } 959 }
962 960
963 TEST_F(ChromeFrameBinariesLoadTest, PerfWarm) { 961 TEST_F(ChromeFrameBinariesLoadTest, PerfWarm) {
964 RunStartupTest("binary_load_warm", "t", "", false /* cold */, 0, NULL, 962 RunStartupTest("binary_load_warm", "t", "", false /* cold */, 0, NULL,
965 true /* important */, false); 963 true /* important */, false);
966 } 964 }
967 965
968 TEST_F(ChromeFrameStartupTestActiveX, PerfCold) { 966 TEST_F(ChromeFrameStartupTestActiveX, PerfCold) {
969 SetConfigInt(L"PreRead", 0); 967 SetConfigInt(L"PreRead", 0);
970 FilePath binaries_to_evict[] = { gears_dll_, avcodec52_dll_, 968 FilePath binaries_to_evict[] = {
971 avformat52_dll_, avutil50_dll_, chrome_exe_, chrome_dll_, 969 avcodec52_dll_, avformat52_dll_, avutil50_dll_, chrome_exe_, chrome_dll_,
972 chrome_frame_dll_}; 970 chrome_frame_dll_
971 };
973 RunStartupTest("cold", "t", "about:blank", true /* cold */, 972 RunStartupTest("cold", "t", "about:blank", true /* cold */,
974 arraysize(binaries_to_evict), binaries_to_evict, 973 arraysize(binaries_to_evict), binaries_to_evict,
975 false /* not important */, false); 974 false /* not important */, false);
976 DeleteConfigValue(L"PreRead"); 975 DeleteConfigValue(L"PreRead");
977 } 976 }
978 977
979 TEST_F(ChromeFrameStartupTestActiveX, PerfColdPreRead) { 978 TEST_F(ChromeFrameStartupTestActiveX, PerfColdPreRead) {
980 SetConfigInt(L"PreRead", 1); 979 SetConfigInt(L"PreRead", 1);
981 FilePath binaries_to_evict[] = { gears_dll_, avcodec52_dll_, 980 FilePath binaries_to_evict[] = {
982 avformat52_dll_, avutil50_dll_, chrome_exe_, chrome_dll_, 981 avcodec52_dll_, avformat52_dll_, avutil50_dll_, chrome_exe_, chrome_dll_,
983 chrome_frame_dll_}; 982 chrome_frame_dll_
983 };
984 RunStartupTest("cold_preread", "t", "about:blank", true /* cold */, 984 RunStartupTest("cold_preread", "t", "about:blank", true /* cold */,
985 arraysize(binaries_to_evict), binaries_to_evict, 985 arraysize(binaries_to_evict), binaries_to_evict,
986 false /* not important */, false); 986 false /* not important */, false);
987 DeleteConfigValue(L"PreRead"); 987 DeleteConfigValue(L"PreRead");
988 } 988 }
989 989
990 TEST_F(ChromeFrameBinariesLoadTest, PerfCold) { 990 TEST_F(ChromeFrameBinariesLoadTest, PerfCold) {
991 FilePath binaries_to_evict[] = {chrome_exe_, chrome_dll_}; 991 FilePath binaries_to_evict[] = {chrome_exe_, chrome_dll_};
992 RunStartupTest("binary_load_cold", "t", "", true /* cold */, 992 RunStartupTest("binary_load_cold", "t", "", true /* cold */,
993 arraysize(binaries_to_evict), binaries_to_evict, 993 arraysize(binaries_to_evict), binaries_to_evict,
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, 1472 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles,
1473 "automationproviderconnect"); 1473 "automationproviderconnect");
1474 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, 1474 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles,
1475 "externaltabnavigate"); 1475 "externaltabnavigate");
1476 PrintPerfTestResults(renderer_main_monitor, kNumCycles, 1476 PrintPerfTestResults(renderer_main_monitor, kNumCycles,
1477 "beginrenderermain"); 1477 "beginrenderermain");
1478 #ifdef NDEBUG 1478 #ifdef NDEBUG
1479 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); 1479 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage");
1480 #endif // NDEBUG 1480 #endif // NDEBUG
1481 } 1481 }
OLDNEW
« no previous file with comments | « chrome_frame/test/net/fake_external_tab.cc ('k') | content/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698