CF application to run bench scenarios on external services. Each service provides 2 scenarios, nominal & benchmark.
Nominal scenarios will launch a light test in order to check that your service works properly.
Benchmark scenarios will launch a heavy test to benchmark your service.
Currently supported services :
- mysql using sysbench as a benchmark tool
- redis using redis-benchmark as a benchmark tool
Currently implemented scenarios :
- mysql : nominal
- redis : nominal
-
This application first needs a redis service in order to store result and queue awaiting benchmarks. This service name MUST starts with
benchmark-redis-storage
cf create-service redis plan benchmark-redis-storage
-
Other services you will bind your application to will be benched, be careful as bench may resul in data loss
-
You need to have pip3 installed to download vendor packages
-
You need to be logged in your org/space and ready to cf push
- Open deploy_on_cf.sh
- Fill
APP_REDIS_STORAGE
with redis service you previously created - Fill
APP_SERVICES_TO_BENCH
variable with services you wish to bench. If you want to bench multiple services, separate them with a space - run
./deploy_on_cf.sh
- Optionnal : setting
DONT_USE_REDIS_BENCHMARK
will use a redis-benchmark substitute to avoid firewall issues
API exposes 2 routes :
- /run : will add an entry in redis queue to start benchmarks.
- /results : returns JSON object containing benchmarks results
- /metrics (
to be implemented
) : returns results in prometheus format
Just curl api_url
/run to start benchmarks, results will appear on api_url
/results as soon as they are available.
If you run a new bench, it will create new results, and so on.
API uses Flask & Celery to provide API and queuing
Worker uses Celery to run tasks