/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeGuruProfiler { namespace Model { /** *

The response of * ConfigureAgent that specifies if an agent profiles or not and * for how long to return profiling data.

See Also:

AWS * API Reference

*/ class AgentConfiguration { public: AWS_CODEGURUPROFILER_API AgentConfiguration(); AWS_CODEGURUPROFILER_API AgentConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_CODEGURUPROFILER_API AgentConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEGURUPROFILER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline const Aws::Map& GetAgentParameters() const{ return m_agentParameters; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline bool AgentParametersHasBeenSet() const { return m_agentParametersHasBeenSet; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline void SetAgentParameters(const Aws::Map& value) { m_agentParametersHasBeenSet = true; m_agentParameters = value; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline void SetAgentParameters(Aws::Map&& value) { m_agentParametersHasBeenSet = true; m_agentParameters = std::move(value); } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& WithAgentParameters(const Aws::Map& value) { SetAgentParameters(value); return *this;} /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& WithAgentParameters(Aws::Map&& value) { SetAgentParameters(std::move(value)); return *this;} /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(const AgentParameterField& key, const Aws::String& value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(key, value); return *this; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(AgentParameterField&& key, const Aws::String& value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(std::move(key), value); return *this; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(const AgentParameterField& key, Aws::String&& value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(key, std::move(value)); return *this; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(AgentParameterField&& key, Aws::String&& value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(std::move(key), std::move(value)); return *this; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(AgentParameterField&& key, const char* value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(std::move(key), value); return *this; } /** *

Parameters used by the profiler. The valid parameters are:

  • *

    MaxStackDepth - The maximum depth of the stacks in the code * that is represented in the profile. For example, if CodeGuru Profiler finds a * method A, which calls method B, which calls method * C, which calls method D, then the depth is 4. If the * maxDepth is set to 2, then the profiler evaluates A * and B.

  • MemoryUsageLimitPercent - * The percentage of memory that is used by the profiler.

  • * MinimumTimeForReportingInMilliseconds - The minimum time in * milliseconds between sending reports.

  • * ReportingIntervalInMilliseconds - The reporting interval in * milliseconds used to report profiles.

  • * SamplingIntervalInMilliseconds - The sampling interval in * milliseconds that is used to profile samples.

*/ inline AgentConfiguration& AddAgentParameters(const AgentParameterField& key, const char* value) { m_agentParametersHasBeenSet = true; m_agentParameters.emplace(key, value); return *this; } /** *

How long a profiling agent should send profiling data using * ConfigureAgent . For example, if this is set to 300, the * profiling agent calls * ConfigureAgent every 5 minutes to submit the profiled data * collected during that period.

*/ inline int GetPeriodInSeconds() const{ return m_periodInSeconds; } /** *

How long a profiling agent should send profiling data using * ConfigureAgent . For example, if this is set to 300, the * profiling agent calls * ConfigureAgent every 5 minutes to submit the profiled data * collected during that period.

*/ inline bool PeriodInSecondsHasBeenSet() const { return m_periodInSecondsHasBeenSet; } /** *

How long a profiling agent should send profiling data using * ConfigureAgent . For example, if this is set to 300, the * profiling agent calls * ConfigureAgent every 5 minutes to submit the profiled data * collected during that period.

*/ inline void SetPeriodInSeconds(int value) { m_periodInSecondsHasBeenSet = true; m_periodInSeconds = value; } /** *

How long a profiling agent should send profiling data using * ConfigureAgent . For example, if this is set to 300, the * profiling agent calls * ConfigureAgent every 5 minutes to submit the profiled data * collected during that period.

*/ inline AgentConfiguration& WithPeriodInSeconds(int value) { SetPeriodInSeconds(value); return *this;} /** *

A Boolean that specifies whether the profiling agent collects * profiling data or not. Set to true to enable profiling.

*/ inline bool GetShouldProfile() const{ return m_shouldProfile; } /** *

A Boolean that specifies whether the profiling agent collects * profiling data or not. Set to true to enable profiling.

*/ inline bool ShouldProfileHasBeenSet() const { return m_shouldProfileHasBeenSet; } /** *

A Boolean that specifies whether the profiling agent collects * profiling data or not. Set to true to enable profiling.

*/ inline void SetShouldProfile(bool value) { m_shouldProfileHasBeenSet = true; m_shouldProfile = value; } /** *

A Boolean that specifies whether the profiling agent collects * profiling data or not. Set to true to enable profiling.

*/ inline AgentConfiguration& WithShouldProfile(bool value) { SetShouldProfile(value); return *this;} private: Aws::Map m_agentParameters; bool m_agentParametersHasBeenSet = false; int m_periodInSeconds; bool m_periodInSecondsHasBeenSet = false; bool m_shouldProfile; bool m_shouldProfileHasBeenSet = false; }; } // namespace Model } // namespace CodeGuruProfiler } // namespace Aws