Code Monkey home page Code Monkey logo

music-box-load-tester's Introduction

MusicBox Load Tester

My Image

This repo contains musicbox-destroyer.py, a script to be used to load test Music Box Interactive and run an excessive amount of simulations at once as well as simulate a DDOS or targeted attack.

Required Packages

  • requests
  • rich
pip3 install requests rich

Usage

Usage: python musicbox-destroyer.py <number of sessions> [--wait] [--fixed-example] [--run-asynchronously] [--ddos-mode]

Example: python musicbox-destroyer.py 20 --wait

        --wait: wait for each session to finish before exiting. Default is to exit as soon as all sessions are created but not necessarily finished.
        --fixed-example: use the same example for each session (default is to use a random example)
        --run-asynchronously: run each session in a separate thread (default is to run each session sequentially). This is useful for testing the server's ability to handle multiple sessions at once (load testing), but it will not give you an accurate idea of how long it takes to run a single session.
        --ddos-mode: can be run in asynchronous or synchronous mode. Once sessions are done running in this mode they'll be restarted from the beginning. This is useful for testing the server's ability to handle a large number of sessions at once (DDoS testing). To stop the script, press CTRL+C, otherwise it'll run forever. For this mode the <number of sessions> will indicate how many should run at a time, however, the script will keep creating new sessions until you stop it.
       

Status Definitions:

  • "Creating...": currently fetching remote UID and creating session
  • "PREPARING MODEL": Setting example for current session
  • "FAILED": Generally returned when there is a server-side or request error. Check the "Message" column for exact error info while running.
  • "RUNNING MODEL": Submitting request to server to start running the simulation
  • "WAITING": Simulation has started, waiting for message from server that it is done.
  • "DONE!!": Simulation has completely finished, once all sessions have finished then the script will exit.

More Information

My Image

  • Above is an example of how errors are presented in real time while running. The format for how errors are presented is: @{API ENDPOINT} {ERROR}
  • The 'Time' column shows either: a) The total time it took to complete the last request for this session (in ms or s), very useful to see how response times change over time. b) The total time it took to set an example and completely finished running it. When showing the total time it took to run, the color will be green instead of purple/blue.

License

MIT

music-box-load-tester's People

Contributors

jwoody02 avatar mattldawson avatar

Stargazers

 avatar

Watchers

Dan Urist avatar  avatar Kyle Shores 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.