chromium/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <stddef.h>

#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/sync/test/integration/autofill_helper.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/webdata/autocomplete/autocomplete_entry.h"
#include "components/sync/engine/cycle/sync_cycle_context.h"
#include "content/public/test/browser_test.h"
#include "testing/perf/perf_result_reporter.h"

namespace {

AutocompleteKey;
AutofillProfile;
AddProfile;
GetAllAutoFillProfiles;
GetKeyCount;
GetProfileCount;
RemoveKeys;
RemoveProfile;
UpdateProfile;
TimeMutualSyncCycle;

// These numbers 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.
constexpr size_t kNumKeys =;
constexpr size_t kNumProfiles =;
// Checks that the given `item_count` is right in the middle between two
// multiples of `kDefaultMaxCommitBatchSize`.
constexpr bool IsRightBetweenCommitBatches(size_t item_count) {}
static_assert;
static_assert;

constexpr char kMetricPrefixAutofill[] =;
constexpr char kMetricAddProfilesSyncTime[] =;
constexpr char kMetricUpdateProfilesSyncTime[] =;
constexpr char kMetricDeleteProfilesSyncTime[] =;
constexpr char kMetricAddKeysSyncTime[] =;
constexpr char kMetricDeleteKeysSyncTime[] =;

perf_test::PerfResultReporter SetUpReporter(const std::string& story) {}

std::string IntToName(int n) {}

void ForceSync(int profile) {}

class AutofillProfileSyncPerfTest : public SyncTest {};

void AutofillProfileSyncPerfTest::AddProfiles(int profile, int num_profiles) {}

void AutofillProfileSyncPerfTest::UpdateProfiles(int profile) {}

void AutofillProfileSyncPerfTest::RemoveProfiles(int profile) {}

const AutofillProfile AutofillProfileSyncPerfTest::NextAutofillProfile() {}

const std::string AutofillProfileSyncPerfTest::NextGUID() {}

const std::string AutofillProfileSyncPerfTest::IntToGUID(int n) {}

const std::string AutofillProfileSyncPerfTest::NextName() {}

IN_PROC_BROWSER_TEST_F(AutofillProfileSyncPerfTest, P0) {}

class AutocompleteSyncPerfTest : public SyncTest {};

void AutocompleteSyncPerfTest::AddKeys(int profile, int num_keys) {}

const AutocompleteKey AutocompleteSyncPerfTest::NextAutocompleteKey() {}

const std::string AutocompleteSyncPerfTest::NextName() {}

IN_PROC_BROWSER_TEST_F(AutocompleteSyncPerfTest, P0) {}

}  // namespace