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

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)