Giter Club home page Giter Club logo

loadtestwebapp's Introduction

LoadTestWebApp

Web Application to Simulate Load Test

Application Setup

  1. Checkout the code.

    $ git clone https://github.com/parshuram-patil/LoadTestWebApp.git
    
  2. Create a python virtual environment

    $ cd LoadTestWebApp
    $ python -m venv ENV
    
  3. Activate the virtual environment

    For Windows:

    $ cd LoadTestWebApp          (if not already in the project base directory)
    $ .\ENV\Scripts\activate.bat
    

    For Bash:

    $ cd LoadTestWebApp          (if not already in the project base directory)
    $ source ENV/Scripts/activate
    
  4. Download & install required Python Dependencies. (ENV) $ pip install -r requirements.txt

  5. Running the Application

    (ENV) $ python app.py
    

Memory Test

Memory Test API's will consume either specified/default memory.

How it works?

  • It divides allowed memory in 10 chunks
  • Consumes all chunks one after another with delay of 5 seconds
  • After consuming all the chunks it waits for 10 seconds
  • Finally it releases all the memory and respond back with "Done!"

API's

  • Consuming memory of default size i.e 1GB

    curl http://127.0.0.1:5000/load/test/memory
    
  • Consuming memory of custom size

    URL parameter 'allowedMemory' specifies how much memory in Gb you want to consume

    Eg.

    • Consuming 10 GB
      curl http://127.0.0.1:5000/load/test/memory?allowedMemory=10
      
    • Consuming 5 GB
      curl http://127.0.0.1:5000/load/test/memory?allowedMemory=4
      

API Logs

Server Logs of API consuming 5GB memory

Memory Consumption Graph

Graph of Server memory by API consuming 5GB memory

loadtestwebapp's People

Contributors

parshuram-patil avatar

Watchers

 avatar

Forkers

maanrz

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.