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

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

Issue 4974001: base: Get rid of 'using' declaration of StringAppendF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years, 1 month 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
« no previous file with comments | « chrome/test/tab_switching/tab_switching_test.cc ('k') | courgette/adjustment_method.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 CoFreeUnusedLibraries(); 342 CoFreeUnusedLibraries();
343 343
344 // TODO(beng): Can't shut down so quickly. Figure out why, and fix. If we 344 // TODO(beng): Can't shut down so quickly. Figure out why, and fix. If we
345 // do, we crash. 345 // do, we crash.
346 PlatformThread::Sleep(50); 346 PlatformThread::Sleep(50);
347 } 347 }
348 348
349 std::string times; 349 std::string times;
350 for (int i = 0; i < kNumCycles; ++i) 350 for (int i = 0; i < kNumCycles; ++i)
351 StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF()); 351 base::StringAppendF(&times, "%.2f,", timings[i].InMillisecondsF());
352 352
353 PrintResultList(graph, "", trace, times, "ms", important); 353 PrintResultList(graph, "", trace, times, "ms", important);
354 } 354 }
355 355
356 FilePath dir_app_; 356 FilePath dir_app_;
357 FilePath chrome_dll_; 357 FilePath chrome_dll_;
358 FilePath chrome_exe_; 358 FilePath chrome_exe_;
359 FilePath chrome_frame_dll_; 359 FilePath chrome_frame_dll_;
360 FilePath icu_dll_; 360 FilePath icu_dll_;
361 FilePath gears_dll_; 361 FilePath gears_dll_;
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 } 1375 }
1376 1376
1377 template <class Monitor> 1377 template <class Monitor>
1378 void PrintPerfTestResults(const Monitor* monitor, 1378 void PrintPerfTestResults(const Monitor* monitor,
1379 int num_cycles, 1379 int num_cycles,
1380 const char* result_name) { 1380 const char* result_name) {
1381 std::string times; 1381 std::string times;
1382 1382
1383 for (int i = 0; i < num_cycles; ++i) { 1383 for (int i = 0; i < num_cycles; ++i) {
1384 ASSERT_TRUE(monitor[i].is_valid()); 1384 ASSERT_TRUE(monitor[i].is_valid());
1385 StringAppendF(&times, "%.2f,", 1385 base::StringAppendF(&times,
1386 monitor[i].duration().InMillisecondsF()); 1386 "%.2f,",
1387 monitor[i].duration().InMillisecondsF());
1387 } 1388 }
1388 1389
1389 PrintResultList(result_name, "", "t", times, "ms", false); 1390 PrintResultList(result_name, "", "t", times, "ms", false);
1390 } 1391 }
1391 1392
1392 TEST(TestAsPerfTest, MetaTag_createproxy) { 1393 TEST(TestAsPerfTest, MetaTag_createproxy) {
1393 const int kNumCycles = 10; 1394 const int kNumCycles = 10;
1394 1395
1395 MonitorTracePair create_proxy_monitor[kNumCycles]; 1396 MonitorTracePair create_proxy_monitor[kNumCycles];
1396 MonitorTraceBetweenEventPair browser_main_start_monitor[kNumCycles]; 1397 MonitorTraceBetweenEventPair browser_main_start_monitor[kNumCycles];
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles, 1457 PrintPerfTestResults(automation_provider_connect_monitor, kNumCycles,
1457 "automationproviderconnect"); 1458 "automationproviderconnect");
1458 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles, 1459 PrintPerfTestResults(external_tab_navigate_monitor, kNumCycles,
1459 "externaltabnavigate"); 1460 "externaltabnavigate");
1460 PrintPerfTestResults(renderer_main_monitor, kNumCycles, 1461 PrintPerfTestResults(renderer_main_monitor, kNumCycles,
1461 "beginrenderermain"); 1462 "beginrenderermain");
1462 #ifdef NDEBUG 1463 #ifdef NDEBUG
1463 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage"); 1464 PrintPerfTestResults(pre_read_chrome_monitor, kNumCycles, "PreReadImage");
1464 #endif // NDEBUG 1465 #endif // NDEBUG
1465 } 1466 }
OLDNEW
« no previous file with comments | « chrome/test/tab_switching/tab_switching_test.cc ('k') | courgette/adjustment_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698