Skip to content

wsperf: stress_test

zaphoyd edited this page Apr 9, 2012 · 4 revisions

stress_test: Each client will generate a message with an ID hash and send it to the server. Message send time and receive time are recorded. Times will all be recorded with the same clock so times for different connections should be compatible. Stats are streamed back to the commanding server.

Connection Options:

  • number of connections to open
  • handshake/sec throttle (or none)
  • reconnect behavior (keep number of connections open constant to adjust for failed or closed connections vs not)
  • max connections (threshold for ending test due to runaway connection failures)
  • connection sync (don't start sending messages until all connections are open)
  • connection lifetime (fixed, random, infinite)

Message Options

  • server mode (echo vs broadcast)
  • number of messages to send (or infinite or none)
  • message delay (or random with a range?)
  • message batch size (how many messages to send after each delay)
  • message source (which connections should send messages: always random?)
  • message size (or random with a range?), note: caveats at small message sizes
  • message content (always random?)
  • correctness checking (always strict?)
  • message sync (don't send a new message until all asks have been received)

Stats to send for each connection

  • connectionid
  • start connect
  • end tcp / start ws handshake
  • on_open
  • on_fail
  • on_close
  • connection close sent

Stats to send for each message

  • messageid
  • send connectionid?
  • recv connectionid?
  • send time
  • recv time
  • opcode
  • payload length

stress_cancel: end the test and return information any outstanding data Options:

  • graceful: perform closing handshake vs drop TCP
Clone this wiki locally