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

Side by Side Diff: chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc

Issue 7605012: Sync performance tests: include datatype in trace label for performance graphs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | chrome/test/live_sync/performance/extensions_sync_perf_test.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/sync/profile_sync_service_harness.h" 5 #include "chrome/browser/sync/profile_sync_service_harness.h"
6 #include "chrome/test/live_sync/bookmarks_helper.h" 6 #include "chrome/test/live_sync/bookmarks_helper.h"
7 #include "chrome/test/live_sync/live_sync_test.h" 7 #include "chrome/test/live_sync/live_sync_test.h"
8 #include "chrome/test/live_sync/performance/sync_timing_helper.h" 8 #include "chrome/test/live_sync/performance/sync_timing_helper.h"
9 9
10 using bookmarks_helper::AddURL; 10 using bookmarks_helper::AddURL;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, P0) { 105 IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, P0) {
106 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 106 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
107 107
108 // TCM ID - 7556828. 108 // TCM ID - 7556828.
109 AddURLs(0, kNumBookmarks); 109 AddURLs(0, kNumBookmarks);
110 base::TimeDelta dt = 110 base::TimeDelta dt =
111 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 111 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
112 ASSERT_EQ(kNumBookmarks, GetURLCount(1)); 112 ASSERT_EQ(kNumBookmarks, GetURLCount(1));
113 SyncTimingHelper::PrintResult("bookmarks", "add", dt); 113 SyncTimingHelper::PrintResult("bookmarks", "add_bookmarks", dt);
114 114
115 // TCM ID - 7564762. 115 // TCM ID - 7564762.
116 UpdateURLs(0); 116 UpdateURLs(0);
117 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 117 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
118 ASSERT_EQ(kNumBookmarks, GetURLCount(1)); 118 ASSERT_EQ(kNumBookmarks, GetURLCount(1));
119 SyncTimingHelper::PrintResult("bookmarks", "update", dt); 119 SyncTimingHelper::PrintResult("bookmarks", "update_bookmarks", dt);
120 120
121 // TCM ID - 7566626. 121 // TCM ID - 7566626.
122 RemoveURLs(0); 122 RemoveURLs(0);
123 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 123 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
124 ASSERT_EQ(0, GetURLCount(1)); 124 ASSERT_EQ(0, GetURLCount(1));
125 SyncTimingHelper::PrintResult("bookmarks", "delete", dt); 125 SyncTimingHelper::PrintResult("bookmarks", "delete_bookmarks", dt);
126 } 126 }
127 127
128 IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, DISABLED_Benchmark) { 128 IN_PROC_BROWSER_TEST_F(BookmarksSyncPerfTest, DISABLED_Benchmark) {
129 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 129 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
130 DisableVerifier(); 130 DisableVerifier();
131 131
132 for (int i = 0; i < kNumBenchmarkPoints; ++i) { 132 for (int i = 0; i < kNumBenchmarkPoints; ++i) {
133 int num_bookmarks = kBenchmarkPoints[i]; 133 int num_bookmarks = kBenchmarkPoints[i];
134 AddURLs(0, num_bookmarks); 134 AddURLs(0, num_bookmarks);
135 base::TimeDelta dt_add = 135 base::TimeDelta dt_add =
(...skipping 15 matching lines...) Expand all
151 base::TimeDelta dt_delete = 151 base::TimeDelta dt_delete =
152 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); 152 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1));
153 ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count()); 153 ASSERT_EQ(0, GetBookmarkBarNode(0)->child_count());
154 ASSERT_TRUE(AllModelsMatch()); 154 ASSERT_TRUE(AllModelsMatch());
155 VLOG(0) << std::endl << "Delete: " << num_bookmarks << " " 155 VLOG(0) << std::endl << "Delete: " << num_bookmarks << " "
156 << dt_delete.InSecondsF(); 156 << dt_delete.InSecondsF();
157 157
158 Cleanup(); 158 Cleanup();
159 } 159 }
160 } 160 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/live_sync/performance/extensions_sync_perf_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698