Skip to content

Add test for ScaleCPULimitsToSandbox runtime config#981

Merged
anmaxvl merged 1 commit intomicrosoft:masterfrom
anmaxvl:maksiman/tests/scale-cpu-limits
Mar 25, 2021
Merged

Add test for ScaleCPULimitsToSandbox runtime config#981
anmaxvl merged 1 commit intomicrosoft:masterfrom
anmaxvl:maksiman/tests/scale-cpu-limits

Conversation

@anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Mar 23, 2021

Test does the following:

  • calculate 1 core equivalent cpu limit based on the number of cores
    the host has, i.e. 10,000/hostNumCPU
  • set container CPU limit to the above value.
    NOTE: There won't be any difference if the host has only 2 cores
    (which is the default for a UVM), but this is unlikely to happen
  • make 2 stats request with a 5 second interval and calculate
    the CPU usage
  • the CPU usage should be around 100% with acceptable error set to 10%

Add requireBinary wrapper to check if a binary with a given
name exists in the same directory as the test executable and
conditionally skips the tests if the binary doesn't exist

Signed-off-by: Maksim An maksiman@microsoft.com

@anmaxvl anmaxvl requested a review from a team as a code owner March 23, 2021 05:36
@anmaxvl anmaxvl force-pushed the maksiman/tests/scale-cpu-limits branch from 726f2d9 to 9147985 Compare March 23, 2021 05:46
@dcantah
Copy link
Contributor

dcantah commented Mar 23, 2021

Can the commit message/description describe what the test is doing also?

@dcantah
Copy link
Contributor

dcantah commented Mar 23, 2021

The test assumes that we have that runtime config on as well, which afaik is hard to tell from here as we don't have access to it :(.

@anmaxvl anmaxvl force-pushed the maksiman/tests/scale-cpu-limits branch from 9147985 to 8eb4863 Compare March 23, 2021 20:45
@anmaxvl anmaxvl changed the title Add tests for ScaleCPULimitsToSandbox runtime config Add test for ScaleCPULimitsToSandbox runtime config Mar 23, 2021
@anmaxvl anmaxvl force-pushed the maksiman/tests/scale-cpu-limits branch from 8eb4863 to 7c283c4 Compare March 23, 2021 20:47
Test does the following:
- calculate 1 core equivalent cpu limit based on the number of cores
    the host has, i.e. 10,000/hostNumCPU
- set container CPU limit to the above value.
    NOTE: There won't be any difference if the host has only 2 cores
    (which is the default for a UVM), but this is unlikely to happen
- make 2 stats request with a 5 second interval and calculate
    the CPU usage
- the CPU usage should be around 100% with acceptable error set to 10%

Add `requireBinary` wrapper to check if a binary with a given
name exists in the same directory as the test executable and
conditionally skips the tests if the binary doesn't exist

Signed-off-by: Maksim An <maksiman@microsoft.com>
@anmaxvl anmaxvl force-pushed the maksiman/tests/scale-cpu-limits branch from 7c283c4 to a83893c Compare March 23, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants