GithubHelp home page GithubHelp logo

neelmshah / rasa-locust-stress-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salgieri/rasa-locust-stress-test

0.0 0.0 0.0 213 KB

This is a basic example of how you can generate hundreds of simultaneous user connects to a Rasa instance, and send multiple conversational messages.

Python 95.78% Shell 4.22%

rasa-locust-stress-test's Introduction

Rasa stress testing with Locust.io

This is a basic example of how you can generate hundreds of simultaneous user connects to a Rasa instance, and send multiple conversational messages.

The original aim for this was to allow us to measure memory and CPU usage, to allow for right-sizing in our cloud environments.

Dependancies

  • Locust.io
  • Socket.io
  • Python Virtual Environment

Setup

We recommend running in a virtual environment to keep everything clean.

python -m venv venv
source venv/bin/activate

Install the dependencies:

 install -r requirements.txt

Configure your socket.io configuration in rasa_socket.py:

ws_url = "http://10.2.1.6:5005/socket.io/"

Change the IP address and port of the your Rasa installation.

For the sake of this you will want to run Rasa with --cors "*"

Fire up Locust.io

locust --host=http://10.2.1.6:5005 --locustfile loadtest/rasa_socket.py --port=80

set --host to be your Rasa IP and port. If you are already running a webserver locally on port 80, you'll want to move --port to something else.

Now browse to your local machine, based on the --port setting

http://localhost

You'll be presented with the New Swarm window. Set the number of hosts, and hatch rate, and then click Start Swarming

alt text

You can see from the dashboard, how many users are spawned, how many connections are made, and how many failures.

alt text

All being well, you can then browse to the Charts menu and see how your swarm is doing

alt text

rasa-locust-stress-test's People

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.