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 #include "chrome_frame/test/perf/chrome_frame_perftest.h" | 5 #include "chrome_frame/test/perf/chrome_frame_perftest.h" |
6 | 6 |
7 #include <atlhost.h> | 7 #include <atlhost.h> |
8 #include <atlwin.h> | 8 #include <atlwin.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 } | 1333 } |
1334 | 1334 |
1335 ~EtwPerfSession() { | 1335 ~EtwPerfSession() { |
1336 base::DeleteFile(etl_log_file_, false); | 1336 base::DeleteFile(etl_log_file_, false); |
1337 } | 1337 } |
1338 | 1338 |
1339 void Start() { | 1339 void Start() { |
1340 // To ensure there is no session leftover from crashes, previous runs, etc. | 1340 // To ensure there is no session leftover from crashes, previous runs, etc. |
1341 base::win::EtwTraceProperties ignore; | 1341 base::win::EtwTraceProperties ignore; |
1342 base::win::EtwTraceController::Stop(L"cf_perf", &ignore); | 1342 base::win::EtwTraceController::Stop(L"cf_perf", &ignore); |
1343 ASSERT_TRUE(file_util::CreateTemporaryFile(&etl_log_file_)); | 1343 ASSERT_TRUE(base::CreateTemporaryFile(&etl_log_file_)); |
1344 ASSERT_HRESULT_SUCCEEDED(controller_.StartFileSession(L"cf_perf", | 1344 ASSERT_HRESULT_SUCCEEDED(controller_.StartFileSession(L"cf_perf", |
1345 etl_log_file_.value().c_str(), false)); | 1345 etl_log_file_.value().c_str(), false)); |
1346 ASSERT_HRESULT_SUCCEEDED(controller_.EnableProvider( | 1346 ASSERT_HRESULT_SUCCEEDED(controller_.EnableProvider( |
1347 base::debug::kChromeTraceProviderName, | 1347 base::debug::kChromeTraceProviderName, |
1348 TRACE_LEVEL_INFORMATION, | 1348 TRACE_LEVEL_INFORMATION, |
1349 ~(base::debug::CAPTURE_STACK_TRACE))); | 1349 ~(base::debug::CAPTURE_STACK_TRACE))); |
1350 } | 1350 } |
1351 | 1351 |
1352 HRESULT Stop() { | 1352 HRESULT Stop() { |
1353 return controller_.Stop(NULL); | 1353 return controller_.Stop(NULL); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, | 1602 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, |
1603 "automationproviderconnect"); | 1603 "automationproviderconnect"); |
1604 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, | 1604 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, |
1605 "externaltabnavigate"); | 1605 "externaltabnavigate"); |
1606 PrintPerfTestResults(renderer_main_monitor, kNumCycles, | 1606 PrintPerfTestResults(renderer_main_monitor, kNumCycles, |
1607 "beginrenderermain"); | 1607 "beginrenderermain"); |
1608 #ifdef NDEBUG | 1608 #ifdef NDEBUG |
1609 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); | 1609 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); |
1610 #endif // NDEBUG | 1610 #endif // NDEBUG |
1611 } | 1611 } |
OLD | NEW |