Skip to content
zaphoyd edited this page Jun 10, 2012 · 12 revisions

Overview

will go here

Tests available

message_test

Message test is a tester that opens a connection to a remote echo server, sends some messages, and closes the connection. Detailed statistics are returned about the performance of the messages.

Example Command:
message_test:uri=ws://localhost:9000;size=4096;count=1000;timeout=10000;binary=true;sync=true;correctness=exact;token=foo;quantile_count=10;rtts=false;

Autobahn 9.x test equivalents:

9.1.x n=65536, 262144, 1048576, 4194304, 8388608, 16777216 message_test:uri=ws://localhost:9000;size=n;count=1;timeout=10000;binary=false;sync=true;correctness=exact;token=foo;quantile_count=10;rtts=false;
9.2.x n=65536, 262144, 1048576, 4194304, 8388608, 16777216 message_test:uri=ws://localhost:9000;size=n;count=1;timeout=10000;binary=true;sync=true;correctness=exact;token=foo;quantile_count=10;rtts=false;
9.7.x n=0, 16, 64, 256, 1024, 4096 message_test:uri=ws://localhost:9000;size=n;count=1000;timeout=10000;binary=false;sync=true;correctness=exact;token=foo;quantile_count=10;rtts=false;
9.8.x n=0, 16, 64, 256, 1024, 4096 message_test:uri=ws://localhost:9000;size=n;count=1000;timeout=10000;binary=true;sync=true;correctness=exact;token=foo;quantile_count=10;rtts=false;

Detailed parameter documentation for message_test
All parameters are required.

uri=[string];
Example: uri=ws://localhost:9000;
URI of the server to connect to

token=[string];
Example: token=foo;
String value that will be returned in the `token` field of all test related messages. A separate token should be sent for each unique test.

quantile_count=[integer];
Example: quantile_count=10;
How many histogram quantiles to return in the test results

rtts=[bool];
Example: rtts:true;
Whether or not to return the full list of round trip times for each message primarily useful for debugging.

size=[interger];
Example: size=4096;
Size of messages to send in bytes. Valid values 0 – max size_t

count=[integer];
Example: count=1000;
Number of test messages to send. Valid values 0-2**64

timeout=[integer];
Example: timeout=10000;
How long to wait (in ms) for a response before failing the test.

binary=[bool];
Example: binary=true;
Whether or not to use binary websocket frames. (true=binary, false=utf8)

sync=[bool];
Example: sync=true;
Syncronize messages. When sync is on wsperf will wait for a response before sending the next message. When sync is off, messages will be sent as quickly as possible.

correctness=[string];
Example: correctness=exact;
Example: correctness=length;
How to evaluate the correctness of responses. Exact checks each response for exact correctness. Length checks only that the response has the correct length. Length mode is faster but won’t catch invalid implimentations. Length mode can be used to test situations where you deliberately return incorrect bytes in order to compare performance (ex: performance with/without masking)

stress_test

Stress test is a tester that opens a multiple connection to a remote echo server, sends some messages, and closes the connection. Basic statistics are returned about the performance of the messages and the tcp, websocket, and close handshakes for each connection.

Example Command:
stress_test:uri=ws://localhost:9000;token=stress;connection_count=5;handshake_delay=10;msg_count=5;msg_size=5000;

uri=[string];
Example: uri=ws://localhost:9000;
URI of the server to connect to

token=[string];
Example: token=foo;
String value that will be returned in the `token` field of all test related messages. A separate token should be sent for each unique test.

connection_count=[integer];
Example: connection_count=50;
Number of connections to open. Valid values 1-2**64. IMPORTANT, values above ~250-1000 (depending on system) require significant configuration of the host operating system running wsperf and the operating system running the server you are testing and possibly your network infrastructure (firewalls, intrusion detection, DoS prevention systems, etc). I am currently compiling some wsperf-specific guidelines for tuning this.

handshake_delay=[integer];
Example: handshake_delay=10;
How long to wait (in ms) between opening each connection.

msg_count=[integer];
Example: msg_count=5;
Once all connections are made, send this many messages. Valid values are 0-2**64

msg_size=[integer];
Example: msg_size=5000;
Size in bytes of each message.