Code Monkey home page Code Monkey logo

wsstat's Introduction

wsstat

Websocket stress testing made beautiful

Build Status Coverage Status PyPi PyPi PyPi

Hello!

This repository holds WSStat, a websocket monitoring and visualization tool written in Python 3.3+, using the great AsyncIO, Websocket, and Urwid libraries ๐Ÿ˜Ž .

It aims to make diagnosing problems and understanding your websocket infrastructure easy and beautiful.

There are still a few edges and whatnot since it's fairly new, and some functionality doesn't exist (yet), but that's where I'm hoping the community can help.

I'm actively looking for feedback

The core of WSStat was written to be modular with extensibility in mind. Want a web API to gather statistics while it runs? How about a websocket server that pushes statistics from multiple workers to one place? Threshold based alerting? Slack integration? File a ticket and we'll kick it around!

It should go without saying, but pull requests are absolutely welcome!

Now, a demo

demo

When you pass the --demo flag to WSStat, it will spin up an asynchronous websocket server on port 65432 point the websocket monitors to that server, allowing you to see functionality with a real websocket server.

Installation

Install from pip - python -m pip install git+https://github.com/godraadam/wsstat.git

The installation should be 100% straight forward and work fine. If that's not the case, please file a ticket!

Please note: WSStat currently only works on Python >= 3.3, and won't install on python 2.7, which is a known limitation.

Usage

Using wsstat is pretty straight forward, and it only has a few knobs (for now). If you want to try wsstat out and don't have a websocket infrastructure handy, you can just pass in --demo to have wsstat set up a server for you!

Other than that, you can adjust the total number of connected clients with -n, the number of simultaneous sockets trying to connect at once with -c, or pass in an arbitrary header (for things like authentication) with -H.

$ wsstat -h
usage: wsstat [-h] [-n TOTAL_CONNECTIONS] [-c MAX_CONNECTING_SOCKETS]
              [-H HEADER] [--demo] [-i]
              [websocket_url]

positional arguments:
  websocket_url         The websocket URL to hit

optional arguments:
  -h, --help            show this help message and exit
  -n TOTAL_CONNECTIONS, --num-clients TOTAL_CONNECTIONS
                        Number of clients to connect - default 250
  -c MAX_CONNECTING_SOCKETS, --max-connects MAX_CONNECTING_SOCKETS
                        Number of connections attempted simultaneously -
                        default 15
  -H HEADER, --header HEADER
                        Pass a custom header with each websocket connection
  --demo                Start a demo websocket server and point wsstat at it
  -i, --insecure        Don't validate SSL certificates on websocket servers

wsstat's People

Contributors

fitblip avatar godraadam avatar uasouz avatar abawchen 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.