GithubHelp home page GithubHelp logo

websockets-stress-test's Introduction

README

Description

WebSockets Stress Test - Tool written in NodeJS that allows to make a stress test for your application that uses WebSockets. You can create behavior scenarios that tool will run on every connection in test.

Installation

cd websockets-stress-test

npm install

node wsst.js -h

websockets-stress-test's People

Contributors

bohdantkachenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

websockets-stress-test's Issues

Error with `-c 10000`

Running a test against the local machine for 10000 connections and it crashes. I'm reasonably certain that the crash is caused by the server not handling 10000 connections but the wsst.js script crashes with this error message. It would be nice if it gave more information.

Error message

...
node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: connect EADDRINUSE
    at errnoException (net.js:640:11)
    at connect (net.js:523:18)
    at net.js:581:9
    at asyncCallback (dns.js:84:16)
    at Object.onanswer [as oncomplete] (dns.js:137:9)

Scenario

exports.init = function (ws, api) {
    ws.on('message', function (message) {
        var obj = JSON.parse(message);
        if (obj.type === 'subscribe') {
            api.checkpoint('got welcome');
        } else if (obj.type === 'error') {
            api.checkpoint('got error');
            ws.close();
        }
    });
    ws.send('0');
    api.checkpoint('sent invalid message');
}

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.