Giter Site home page Giter Site logo

cloud-foundry / cf-services-bench Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orange-cloudfoundry/cf-services-bench

0.0 1.0 0.0 5.17 MB

CF application to bench external services

License: Apache License 2.0

Python 34.67% Lua 61.48% Shell 3.85%

cf-services-bench's Introduction

Summary

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

⚠️ Please be advised that benchmarks need their own database, don't use a production database, it will result in dataloss. ⚠️

Installation

pre-requisites

  • 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

configuration

  • 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

Usage

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.

Architecture

API

API uses Flask & Celery to provide API and queuing

worker

Worker uses Celery to run tasks

cf-services-bench's People

Contributors

axelfauvel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.