Giter Club home page Giter Club logo

twyla_config_service's Introduction

Twyla Configuration service

image

image

Development Installation

This project uses Pipenv

To install for development do:

git clone https://github.com/ahussein/twyla_config_service.git
cd twyla_config_service
pipenv shell
pipenv install --dev

To run the app, you need a DB instance running and you can use an environment variable to point to your running DB instance like the following:

export DB_URI='mongodb://localhost:27017/testdb'

If the environment is not set, then the app will try to connect to the following URI:

mongodb://localhost:27017/twyla_configs

After making sure the DB instance is up and running you can start the app service using the following command:

python3 app/app.py

Running the Tests

To run the tests with coverage report, do:

pytest -v --cov=./app test

The above tests requires a DB instance to be running since it includes integration tests. To run only unittests do:

pytest -v test/unittests

-----------------Load Testing The Service -----------------For load testing, I have picked up Locust: https://locust.io/ It is python based, so tests are written in python and it has a nice UI as well. Make sure to have your virtualenv is activated and then:

pipenv install locustio
locust -f load_test.py --no-web -c 1000 -r 10 --host=http://localhost:8000 --csv=load_test_result.csv

This will start the load tester with a 1000 user each of them is trying to execute a mixure of the the exposed endpoints. The above command will run the load tests in no-ui mode and you can choose to run with the UI mode. Please check the docs for more details here: https://docs.locust.io/en/latest/what-is-locust.html

twyla_config_service's People

Contributors

ahussein avatar

Watchers

 avatar  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.