Add -L
to simulate the application level latency
-L enable the receive side to sleep in a random integer(one of 1, 2, 3), to simulate application level latency
An example
$ ttcp -r -L
ttcp-r: buflen=1048576, align=16384/0, port=5001 tcp
ttcp-r: socket
ttcp-r: accept from 127.0.0.1:46482
ttcp-r: worker 107133 start
ttcp-r: worker 107133, force delay 3 s
ttcp-r: worker 107133, force delay 2 s
ttcp-r: worker 107133, force delay 1 s
ttcp-r: worker 107133, stats of 127.0.0.1:46482
1048576 bytes in 6.01 real seconds = 0.17 MB/sec +++
1048576 bytes in 0.00 CPU seconds = 935.45 MB/cpu sec
4 I/O calls, msec/call = 1538.36, calls/sec = 0.67
0.0user 0.0sys 0:06real 0% 0i+0d 832maxrss 0+222pf 4+0csw
buffer address 0x7f993ba3c000
Note that the transfer rate is 0.17 MB/sec
, is a quite low receive rate