blob: e80ea89b4bbf5136a31179c39e0dd46aae51860e [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2014 The Chromium Authors
[email protected]92e09a182014-01-08 18:21:002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_VARIATIONS_VARIATIONS_SEED_SIMULATOR_H_
6#define COMPONENTS_VARIATIONS_VARIATIONS_SEED_SIMULATOR_H_
7
Scott Violet69a5d8dd2021-06-01 23:46:488#include "base/component_export.h"
[email protected]92e09a182014-01-08 18:21:009
[email protected]59b6f672014-07-26 18:35:4710namespace variations {
[email protected]92e09a182014-01-08 18:21:0011
Steven Holte6fae4f72022-10-20 14:24:0112class EntropyProviders;
isherman52a81bd2017-06-07 23:30:0613struct ClientFilterableState;
[email protected]a81120b62014-04-18 01:56:0314class VariationsSeed;
[email protected]92e09a182014-01-08 18:21:0015
Steven Holte6fae4f72022-10-20 14:24:0116// The result of variations seed simulation, counting the number of experiment
17// group changes of each type that are expected to occur on a restart with the
18// seed.
19struct COMPONENT_EXPORT(VARIATIONS) SeedSimulationResult {
20 // The number of expected group changes that do not fall into any special
21 // category. This is a lower bound due to session randomized studies.
22 int normal_group_change_count = 0;
Scott Violet69a5d8dd2021-06-01 23:46:4823
Steven Holte6fae4f72022-10-20 14:24:0124 // The number of expected group changes that fall in the category of killed
25 // experiments that should trigger the "best effort" restart mechanism.
26 int kill_best_effort_group_change_count = 0;
[email protected]a81120b62014-04-18 01:56:0327
Steven Holte6fae4f72022-10-20 14:24:0128 // The number of expected group changes that fall in the category of killed
29 // experiments that should trigger the "critical" restart mechanism.
30 int kill_critical_group_change_count = 0;
[email protected]92e09a182014-01-08 18:21:0031};
32
Steven Holte6fae4f72022-10-20 14:24:0133// Computes differences between the current process' field trial state and
34// the result of evaluating |seed| with the given parameters.
35COMPONENT_EXPORT(VARIATIONS)
36SeedSimulationResult SimulateSeedStudies(
37 const VariationsSeed& seed,
38 const ClientFilterableState& client_state,
39 const EntropyProviders& entropy_providers);
40
[email protected]59b6f672014-07-26 18:35:4741} // namespace variations
[email protected]92e09a182014-01-08 18:21:0042
43#endif // COMPONENTS_VARIATIONS_VARIATIONS_SEED_SIMULATOR_H_