Last active
November 13, 2019 14:44
-
-
Save pcolazurdo/8c782bc959a6bfdbd51c35af9936caf2 to your computer and use it in GitHub Desktop.
Stress Test with bombardier
This file contains hidden or 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
{ | |
"metricFilters": [ | |
{ | |
"filterName": "result-2xx", | |
"filterPattern": "{ $.result.req2xx = * }", | |
"metricTransformations": [ | |
{ | |
"metricName": "bombardier-2xx", | |
"metricNamespace": "LogMetrics", | |
"metricValue": "$.result.req2xx", | |
"defaultValue": 0.0 | |
} | |
] | |
"logGroupName": "/stresstest/bombardier" | |
} | |
] | |
} |
This file contains hidden or 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
#!/bin/bash | |
URL=https://xxxxxxxxxxxxxx.execute-api.eu-west-1.amazonaws.com/prod | |
LOG_NAME=/stresstest/bombardier | |
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
for i in `seq 10` | |
do | |
./bombardier ${URL} -d 5s -oj -pr -n 10000 -c100 | \ | |
tee /dev/tty | \ | |
./cloudwatch-logger $LOG_NAME ${INSTANCE_ID}-$(date +"%Y%m%d%H%M%S") | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment