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 #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 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 | 1322 |
1323 TracedEvents* EtwConsumer::delegate_ = NULL; | 1323 TracedEvents* EtwConsumer::delegate_ = NULL; |
1324 }; // namespace | 1324 }; // namespace |
1325 | 1325 |
1326 class EtwPerfSession { | 1326 class EtwPerfSession { |
1327 public: | 1327 public: |
1328 EtwPerfSession() { | 1328 EtwPerfSession() { |
1329 } | 1329 } |
1330 | 1330 |
1331 ~EtwPerfSession() { | 1331 ~EtwPerfSession() { |
1332 file_util::Delete(etl_log_file_, false); | 1332 base::Delete(etl_log_file_, false); |
1333 } | 1333 } |
1334 | 1334 |
1335 void Start() { | 1335 void Start() { |
1336 // To ensure there is no session leftover from crashes, previous runs, etc. | 1336 // To ensure there is no session leftover from crashes, previous runs, etc. |
1337 base::win::EtwTraceProperties ignore; | 1337 base::win::EtwTraceProperties ignore; |
1338 base::win::EtwTraceController::Stop(L"cf_perf", &ignore); | 1338 base::win::EtwTraceController::Stop(L"cf_perf", &ignore); |
1339 ASSERT_TRUE(file_util::CreateTemporaryFile(&etl_log_file_)); | 1339 ASSERT_TRUE(file_util::CreateTemporaryFile(&etl_log_file_)); |
1340 ASSERT_HRESULT_SUCCEEDED(controller_.StartFileSession(L"cf_perf", | 1340 ASSERT_HRESULT_SUCCEEDED(controller_.StartFileSession(L"cf_perf", |
1341 etl_log_file_.value().c_str(), false)); | 1341 etl_log_file_.value().c_str(), false)); |
1342 ASSERT_HRESULT_SUCCEEDED(controller_.EnableProvider( | 1342 ASSERT_HRESULT_SUCCEEDED(controller_.EnableProvider( |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1598 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, | 1598 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, |
1599 "automationproviderconnect"); | 1599 "automationproviderconnect"); |
1600 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, | 1600 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, |
1601 "externaltabnavigate"); | 1601 "externaltabnavigate"); |
1602 PrintPerfTestResults(renderer_main_monitor, kNumCycles, | 1602 PrintPerfTestResults(renderer_main_monitor, kNumCycles, |
1603 "beginrenderermain"); | 1603 "beginrenderermain"); |
1604 #ifdef NDEBUG | 1604 #ifdef NDEBUG |
1605 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); | 1605 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); |
1606 #endif // NDEBUG | 1606 #endif // NDEBUG |
1607 } | 1607 } |
OLD | NEW |