Chromium Code Reviews| 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: |