-
Notifications
You must be signed in to change notification settings - Fork 20
Throughput Testing
The throughput tester instantiates a client or server and then tests the reliable layer by sending chunks of random data that keep increasing in the size of data being sent over. Running the throughput tester looks like so:
python ThroughputTester.py [client/server] --testing-stack=<your_reliable_layer> --reference-stack=<reliable_layer>
The arguments passed to it are:
- The mode, which is either a client or server
- The layer which you wish to test
- The layer which you wish to test against
This utility is designed to operate on two different stacks, however initially you may just want to test against your own. In this case, the client v. server won't matter and using either argument will give you the same results.
You can also use this to test interoperability with another groups implementation of their reliable layer. IN this case have them send you their module (use .pyc files to prevent code sharing) and in then you can test by running the following commands
python ThroughputTester.py client --testing-stack=<their_reliable_layer> --reference-stack=<your_reliable_layer>
python ThroughputTester.py server --testing-stack=<their_reliable_layer> --reference-stack=<your_reliable_layer>
Please note, you can register the same connector under multiple names. So, after installing your friend's module under .playground/connectors, you could edit their init.py file and add a new line with an additional setConnector() call. This allows you to have modules that don't have collisions in the namespace.
The ThroughputTester has a debug line that has been commented out. If you're getting a lot of failures, you can turn this on. It will report if packets are having trouble being deserialized, which typically indicates that your PIMP layer is passing up the wrong data in data_received.
Find the tester under:
test/samples/blackbox_tests