-
-
Save nully0x/f731c8af3e2ffc6c5148d606697d0f5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://gist.github.com/fda147804b59fd2a0cbb5fb5deb4d00b | |
################################################################## | |
# The Best Performance And Load Testing Tool? k6 By Grafana Labs # | |
# https://youtu.be/wfanR-Ps-lk # | |
################################################################## | |
# Additional Info: | |
# - k6: https://k6.io | |
# - Google Cloud Run (GCR) vs Azure Container Instances (ACI) vs AWS ECS with Fargate: https://youtu.be/Jq8MY1ZGjno | |
######### | |
# Setup # | |
######### | |
# Install the `k6` CLI from https://k6.io/docs/getting-started/installation | |
git clone https://github.com/vfarcic/k6-demo | |
cd k6-demo | |
############# | |
# k6 Syntax # | |
############# | |
cat simple.js | |
########################## | |
# Run Load Tests With k6 # | |
########################## | |
k6 run simple.js | |
# Open https://k6.io/docs/using-k6/metrics/ | |
k6 run --vus 10 --duration 30s simple.js | |
############## | |
# k6 Options # | |
############## | |
cat massive.js | |
# Open https://k6.io/docs/using-k6/options/ | |
k6 run massive.js | |
############# | |
# k6 Stages # | |
############# | |
cat stages.js | |
k6 run stages.js | |
echo $? | |
#################################### | |
# k6 Thresholds In CI/CD Pipelines # | |
#################################### | |
cat ci.js | |
k6 run ci.js | |
echo $? | |
############ | |
# k6 Cloud # | |
############ | |
# Open https://k6.io + `TRY FOR FREE` | |
# Open https://app.k6.io | |
# Replace `[...]` with the token | |
export K6_TOKEN=[...] | |
k6 login cloud --token $K6_TOKEN | |
k6 cloud ci.js | |
############## | |
# k6 Pricing # | |
############## | |
# https://k6.io/pricing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment