Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors |
[email protected] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 2 | // 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 Violet | 69a5d8dd | 2021-06-01 23:46:48 | [diff] [blame] | 8 | #include "base/component_export.h" |
[email protected] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 9 | |
[email protected] | 59b6f67 | 2014-07-26 18:35:47 | [diff] [blame] | 10 | namespace variations { |
[email protected] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 11 | |
Steven Holte | 6fae4f7 | 2022-10-20 14:24:01 | [diff] [blame] | 12 | class EntropyProviders; |
isherman | 52a81bd | 2017-06-07 23:30:06 | [diff] [blame] | 13 | struct ClientFilterableState; |
[email protected] | a81120b6 | 2014-04-18 01:56:03 | [diff] [blame] | 14 | class VariationsSeed; |
[email protected] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 15 | |
Steven Holte | 6fae4f7 | 2022-10-20 14:24:01 | [diff] [blame] | 16 | // 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. | ||||
19 | struct 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 Violet | 69a5d8dd | 2021-06-01 23:46:48 | [diff] [blame] | 23 | |
Steven Holte | 6fae4f7 | 2022-10-20 14:24:01 | [diff] [blame] | 24 | // 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] | a81120b6 | 2014-04-18 01:56:03 | [diff] [blame] | 27 | |
Steven Holte | 6fae4f7 | 2022-10-20 14:24:01 | [diff] [blame] | 28 | // 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] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 31 | }; |
32 | |||||
Steven Holte | 6fae4f7 | 2022-10-20 14:24:01 | [diff] [blame] | 33 | // Computes differences between the current process' field trial state and |
34 | // the result of evaluating |seed| with the given parameters. | ||||
35 | COMPONENT_EXPORT(VARIATIONS) | ||||
36 | SeedSimulationResult SimulateSeedStudies( | ||||
37 | const VariationsSeed& seed, | ||||
38 | const ClientFilterableState& client_state, | ||||
39 | const EntropyProviders& entropy_providers); | ||||
40 | |||||
[email protected] | 59b6f67 | 2014-07-26 18:35:47 | [diff] [blame] | 41 | } // namespace variations |
[email protected] | 92e09a18 | 2014-01-08 18:21:00 | [diff] [blame] | 42 | |
43 | #endif // COMPONENTS_VARIATIONS_VARIATIONS_SEED_SIMULATOR_H_ |