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

Unified Diff: chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc

Issue 8892028: [Sync] Change the number of URLs in the typed URLs perf test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
diff --git a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
index 2669a273fb9aecaab6984f9be8fb263e140a9644..715a32d59e5d01920952709ed29724c464ed05b2 100644
--- a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/basictypes.h"
#include "base/stringprintf.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
+#include "chrome/browser/sync/sessions/sync_session_context.h"
#include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
@@ -13,7 +15,19 @@ using typed_urls_helper::AssertAllProfilesHaveSameURLsAsVerifier;
using typed_urls_helper::DeleteUrlFromHistory;
using typed_urls_helper::GetTypedUrlsFromClient;
-static const int kNumUrls = 150;
+// This number should be as far away from a multiple of
+// kDefaultMaxCommitBatchSize as possible, so that sync cycle counts
+// for batch operations stay the same even if some batches end up not
+// being completely full.
+static const int kNumUrls = 163;
Andrew T Wilson (Slow) 2011/12/10 02:23:46 This is a little arbitrary, but OK. An alternative
+// This compile assert basically asserts that kNumUrls is right in the
+// middle between two multiples of kDefaultMaxCommitBatchSize.
+COMPILE_ASSERT(
+ ((kNumUrls % browser_sync::kDefaultMaxCommitBatchSize) >=
+ (browser_sync::kDefaultMaxCommitBatchSize / 2)) &&
+ ((kNumUrls % browser_sync::kDefaultMaxCommitBatchSize) <=
+ ((browser_sync::kDefaultMaxCommitBatchSize + 1) / 2)),
+ kNumUrlsShouldBeBetweenTwoMultiplesOfkDefaultMaxCommitBatchSize);
class TypedUrlsSyncPerfTest : public SyncTest {
public:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698