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

[YUNIKORN-2374] Add Performance testing tools #774

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wusamzong
Copy link
Contributor

What is this PR for?

To enhance testing convenience, three tools have been added, accompanied by a readme.md file detailing their usage.
These tools are designed to generate YAML files for various test scenarios. The tests cover the following areas:

  • Taint & Toleration
  • Affinity & Anti-Affinity
  • PriorityClass

What type of PR is it?

  • - sub-task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2374/

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (710f7bf) 69.52% compared to head (321985a) 71.09%.
Report is 21 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #774      +/-   ##
==========================================
+ Coverage   69.52%   71.09%   +1.57%     
==========================================
  Files          50       43       -7     
  Lines        7990     7691     -299     
==========================================
- Hits         5555     5468      -87     
+ Misses       2247     2020     -227     
- Partials      188      203      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pbacsko pbacsko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, first round. Sorry for the delay.

Comment on lines +82 to +83
echo "Create $((NUM_PODS/2/2)) pods, each with random node affinity using the required rule."
echo "Create $((NUM_PODS/2/2)) pods, each with random node affinity using the preferred rule."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd just print a single line:
echo "Create $((NUM_PODS/2/2)) pods, each with random node affinity using required and preferred rule."

Comment on lines +67 to +68
NUM_PODS=$1
NUM_NODES=$2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the minimum number of pods/nodes that make sense? Looking at the code below, we need at least 4 nodes. We need to validate them and show an error if it's necessary.

Comment on lines +88 to +91
randHost1=$((RANDOM % NUM_NODES))
randHost2=$((RANDOM % NUM_NODES))
randHost3=$((RANDOM % NUM_NODES))
randHost4=$((RANDOM % NUM_NODES))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest reproducible testing. Determine a step from the number of nodes.

  • 4-7 nodes -> randHostN = prev + 1
  • 8-11 nodes -> randHostN = prev + 2
  • 12-15 nodes -> randHostN = prev + 3
    etc

Comment on lines +159 to +160
randAppID1=$((RANDOM % NUM_PODS))
randAppID2=$((RANDOM % NUM_PODS))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, try to come up with a deterministic code here.

echo "Create $((NUM_PODS)) Pods and save them to a YAML file, with each Pod assigned a PriorityClass selected at random."
for (( j=0;j<NUM_PODS; j++))
do
randPriority=$((RANDOM % NUM_PRIORITY))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deterministic priority

echo "Create $((NUM_PODS)) Pods and save them to a YAML file, each Pod with a randomly assigned toleration."
for (( j=0;j<NUM_PODS; j++))
do
randValue=$((RANDOM % NUM_NODES))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a deterministic number here

Comment on lines +125 to +126
NUM_PODS=$1
NUM_NODES=$2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify that the numbers makes sense.

Comment on lines +64 to +65
NUM_PODS=$1
NUM_PRIORITY=$2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify that the numbers make sense.

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