diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-10 04:21:34 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-10 04:21:34 +0000 |
commit | 83260e00ec89e0a98492a1d3f5aad64684c3316d (patch) | |
tree | 7bc0d833aa5dc2c396339e69bee4ce5a22064a2e | |
parent | 767add2f0fbb2bba945d015ea1c5cdff47a0117e (diff) | |
download | chromium_src-83260e00ec89e0a98492a1d3f5aad64684c3316d.zip chromium_src-83260e00ec89e0a98492a1d3f5aad64684c3316d.tar.gz chromium_src-83260e00ec89e0a98492a1d3f5aad64684c3316d.tar.bz2 |
[Sync] Change the number of URLs in the typed URLs perf test
This is a partial speculative fix to stabilize the run times of the delete
portion of the perf test.
BUG=107034,107040
TEST=
Review URL: http://codereview.chromium.org/8892028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113941 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc | 16 |
1 files changed, 15 insertions, 1 deletions
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 2669a27..715a32d 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; +// 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: |