-
Notifications
You must be signed in to change notification settings - Fork 136
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
There was a problem hiding this 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.
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." |
There was a problem hiding this comment.
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."
NUM_PODS=$1 | ||
NUM_NODES=$2 |
There was a problem hiding this comment.
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.
randHost1=$((RANDOM % NUM_NODES)) | ||
randHost2=$((RANDOM % NUM_NODES)) | ||
randHost3=$((RANDOM % NUM_NODES)) | ||
randHost4=$((RANDOM % NUM_NODES)) |
There was a problem hiding this comment.
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
randAppID1=$((RANDOM % NUM_PODS)) | ||
randAppID2=$((RANDOM % NUM_PODS)) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
NUM_PODS=$1 | ||
NUM_NODES=$2 |
There was a problem hiding this comment.
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.
NUM_PODS=$1 | ||
NUM_PRIORITY=$2 |
There was a problem hiding this comment.
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.
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:
What type of PR is it?
What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-2374/