Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small updates for core tests to work with the main automation. #4004

Merged
merged 2 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions sdk/core/perf/test/inc/azure/perf/test/delay_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace Azure { namespace Perf { namespace Test {
{
// Increment the counter and fetch the value, then remove 1 to get the previous-increment
// value
auto instanceCount = _detail::DelayTestInstanceCount.fetch_add(1) - 1;
gearama marked this conversation as resolved.
Show resolved Hide resolved
auto instanceCount = _detail::DelayTestInstanceCount.fetch_add(0);
// default value if option is not parsed is 1000
auto initialDelay = m_options.GetOptionOrDefault("InitialDelayMs", 1000);
auto instanceGrowFactor = m_options.GetOptionOrDefault("InstanceGrowthFactor", 1);
Expand All @@ -77,17 +77,14 @@ namespace Azure { namespace Perf { namespace Test {
std::vector<Azure::Perf::TestOption> GetTestOptions() override
{
return {
{"InitialDelayMs",
{"--delay"},
"Initial delay (in milliseconds). Default to 1000 (1sec)",
1},
{"InitialDelayMs", {"-m"}, "Initial delay (in milliseconds). Default to 1000 (1sec)", 1},
{"InstanceGrowthFactor",
{"--infactor"},
{"-n"},
"Instance growth factor. The delay of instance N will be (InitialDelayMS * "
"(InstanceGrowthFactor ^ InstanceCount)). Default to 1",
1},
{"IterationGrowthFactor",
{"--itfactor"},
{"-t"},
"Initial delay (in milliseconds). The delay of iteration N will be (InitialDelayMS * "
"(IterationGrowthFactor ^ IterationCount)). Default to 1",
1}};
Expand Down
16 changes: 15 additions & 1 deletion sdk/core/perf/test/inc/azure/perf/test/no_op_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,21 @@ namespace Azure { namespace Perf { namespace Test {
* @brief Define an empty test.
*
*/
void Run(Azure::Core::Context const&) override {}
void Run(Azure::Core::Context const&) override
{ // Get the option or a default value of 0
auto myTestOption = m_options.GetOptionOrDefault("extraOption", 0);
(void)myTestOption;
}

/**
* @brief Define the test options for the test.
*
* @return The list of test options.
*/
std::vector<Azure::Perf::TestOption> GetTestOptions() override
{
return {{"extraOption", {"-e"}, "Example for extended option for test.", 1}};
}

/**
* @brief Get the static Test Metadata for the test.
Expand Down