Skip to content

Instantly share code, notes, and snippets.

@pcolazurdo
Last active November 13, 2019 14:44
Show Gist options
  • Save pcolazurdo/8c782bc959a6bfdbd51c35af9936caf2 to your computer and use it in GitHub Desktop.
Save pcolazurdo/8c782bc959a6bfdbd51c35af9936caf2 to your computer and use it in GitHub Desktop.
Stress Test with bombardier
{
"metricFilters": [
{
"filterName": "result-2xx",
"filterPattern": "{ $.result.req2xx = * }",
"metricTransformations": [
{
"metricName": "bombardier-2xx",
"metricNamespace": "LogMetrics",
"metricValue": "$.result.req2xx",
"defaultValue": 0.0
}
]
"logGroupName": "/stresstest/bombardier"
}
]
}
#!/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