Can't loadtest cowboy (websockets) with tsung locally

code --> https://github.com/idi-ot/ws_bench

I’ve installed tsung with homebrew, so you might need to change this line in tsung.xml

<!DOCTYPE tsung SYSTEM "/usr/local/Cellar/tsung/1.6.0/share/tsung/tsung-1.0.dtd">

to something else if you don’t use homebrew.

Right now I don’t get any connected “users”.

This callback in the handler

  def websocket_init(_type, req, _opts) do
    Logger.debug("someone connected")
    {:ok, req, %{}, @timeout}
  end

doesn’t output anything. Not even once.

if you are on otp20 you need to use this branch of tsung https://github.com/IRog/tsung/tree/erlang20

brew uninstall tsung, and then git clone and the classic ./configure; make; make install

btw if you are fooling with benchmarks might be interesting to give gatling a go as well http://gatling.io/docs/current/http/websocket/

1 Like

Thanks, I’ll try gatling as well and probably post the results here.

1 Like