Eli Fulkerson .com HomeProjectsPython-udp-stress-tester
 

Quick and Dirty Python UDP Stress Test

Description:

This is a pair of scripts that serve to do a rough 'stress test' of UDP capacity between two points on the network. The output is in kilobits per second.

Platform:

Should work anywhere that Python works.

Output:

Client:

C:\Python24>python udp_stress_client.py


----------------------------------------
udp_stress_client.py
Updates and documentation (if any) at http://www.elifulkerson.com
----------------------------------------

Starting client end.  Control-C to quit.

Our target:
udp_stress_server.py running on localhost port 8105


Enter number of bytes to send and the number of times to send them:
(for instance '100 10' to send 10 bursts of 100 bytes each)
% 10000 10
* * * * * * * * * * Done.
% 

Server:

C:\Python24>python udp_stress_server.py


----------------------------------------
udp_stress_server.py
Updates and documentation (if any) at http://www.elifulkerson.com
----------------------------------------


Starting UDP receive server...  control-break to exit.

Waiting for data...

Rcvd: 1 bytes, 1 total in 5.67876503857 s at 0.0014087570001 kbps
Reset recieved, clearing statistics.

Rcvd: 10000 bytes, 10000 total in 0.00103365092491 s at 77395.5675676 kbps

Rcvd: 10000 bytes, 20000 total in 0.00237320665057 s at 67419.3290171 kbps

Rcvd: 10000 bytes, 30000 total in 0.00382031794544 s at 62821.9963437 kbps

Rcvd: 10000 bytes, 40000 total in 0.00508528318543 s at 62926.682415 kbps

Rcvd: 10000 bytes, 50000 total in 0.00636784842766 s at 62815.5654997 kbps

Rcvd: 10000 bytes, 60000 total in 0.00769818510453 s at 62352.3588329 kbps

Rcvd: 10000 bytes, 70000 total in 0.00895029954924 s at 62567.7383108 kbps

Rcvd: 10000 bytes, 80000 total in 0.0102228076473 s at 62605.110267 kbps

Rcvd: 10000 bytes, 90000 total in 0.0114995062222 s at 62611.3840099 kbps

Rcvd: 10000 bytes, 100000 total in 0.0127552524134 s at 62719.2605896 kbps

Caveats:

Download:

(You will need both)
udp_stress_server.py
udp_stress_client.py