Chromium Code Reviews| Index: chrome/common/stack_sampling_configuration.h |
| diff --git a/chrome/common/stack_sampling_configuration.h b/chrome/common/stack_sampling_configuration.h |
| index 1400d741590863a1f036beff661c890c14b2c598..d26d3286b39ea7583df170c36450a2b284a7386f 100644 |
| --- a/chrome/common/stack_sampling_configuration.h |
| +++ b/chrome/common/stack_sampling_configuration.h |
| @@ -46,6 +46,7 @@ class StackSamplingConfiguration { |
| static StackSamplingConfiguration* Get(); |
| private: |
| + // Configuration to use for this Chrome instance. |
| enum ProfileConfiguration { |
| // Chrome-wide configurations set in the browser process. |
| PROFILE_DISABLED, |
| @@ -59,6 +60,18 @@ class StackSamplingConfiguration { |
| PROFILE_FROM_COMMAND_LINE |
| }; |
| + // Configuration variations, along with weights to use when randomly choosing |
| + // one of a set of variations. |
| + struct Variation { |
| + ProfileConfiguration config; |
| + int weight; |
| + }; |
| + |
| + // Randomly chooses a configuration from the weighted variations. Weights must |
| + // sum to 100. |
|
Ilya Sherman
2016/10/12 20:52:31
Why are weights required to sum to 100? What if y
Mike Wittman
2016/10/12 21:50:41
It's not strictly needed, but is a small sanity ch
Ilya Sherman
2016/10/12 22:16:17
Got it, that makes sense. Would be nice to briefl
Mike Wittman
2016/10/12 23:00:32
Done.
|
| + static ProfileConfiguration ChooseConfiguration( |
| + const std::vector<Variation>& variations); |
| + |
| // Generates sampling profiler configurations for all processes. |
| static ProfileConfiguration GenerateConfiguration(); |