Skip to content

wsperf: stress_test

zaphoyd edited this page May 4, 2012 · 4 revisions

stress_test: Open n connections to the server. Send messages from clients to server with an ID hash. Record stats about connection handshakes and messages sent. 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: small message sizes, specifically payload < sizeof(messageid), cannot be measured accurately
  • message content (always random?)
  • correctness checking (always strict?)
  • message sync (don't send a new message until all acks have been received)

Stats to send for each connection

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

Stats to send for each message

  • messageid
  • send connectionid?
  • recv connectionid?
  • send timestamp
  • recv timestamp
  • 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