-
Notifications
You must be signed in to change notification settings - Fork 888
chore: add scaletest convenience script #7819
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
Conversation
scripts/scaletest.sh
Outdated
attempt_counter=0 | ||
max_attempts=6 # 60 seconds | ||
echo -n "Waiting for Coder deployment at ${SCALETEST_CODER_URL} to become ready" | ||
until curl --output /dev/null --silent --fail "${SCALETEST_CODER_URL}/healthz"; do |
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'm not a fan of bash
for this sort of thing because it makes it basically impossible to be cross-platform due to shelling out to commands that we don't control the version of.
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.
Would you be more in favour of a kubectl wait
?
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.
It's not curl
, in particular, that's the problem...
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.
LGTM 👍 I left a few comments, but these can be applied iteratively or discarded.
I'd like to see a public runbook for developers trying to run these scale tests. It would be awesome to store it in our Coder docs. Some customers may want to perform these to examine their infra.
scaletest/scaletest.sh
Outdated
echo "Taking pprof snapshots" | ||
maybedryrun "$DRY_RUN" curl --silent --fail --output "${SCALETEST_NAME}-heap.pprof.gz" http://localhost:6061/debug/pprof/heap | ||
maybedryrun "$DRY_RUN" curl --silent --fail --output "${SCALETEST_NAME}-goroutine.pprof.gz" http://localhost:6061/debug/pprof/goroutine | ||
maybedryrun "$DRY_RUN" kill $pfpid |
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.
Suggestion: Could remove trap handler here to avoid error on exit due to missing pid:
maybedryrun "$DRY_RUN" kill $pfpid | |
maybedryrun "$DRY_RUN" kill $pfpid | |
maybedryrun "$DRY_RUN" trap - EXIT |
Adds a convenience script for scaletesting. This will automatically stand up a scale testing cluster, create a number of workspaces, and run traffic generation against the workspaces.
A number of sample scenarios are included. I'm open to changing the naming scheme, but for now I'm settling on T-shirt sizes with multipliers for the number of workspace nodes.
Additional changes: