gov.lbl.dsd.sea.nio.demo
Class PingPongBench
java.lang.Object
gov.lbl.dsd.sea.EventHandler
gov.lbl.dsd.sea.nio.AgentEventHandler
gov.lbl.dsd.sea.nio.demo.PingPongBench
- public class PingPongBench
- extends AgentEventHandler
Asynchronous non-blocking ping pong benchmark; Sends messages back and forth
between client and server and measures throughput.
Example server usage (large messages): fire-java gov.lbl.dsd.sea.nio.demo.PingPongBench
server 9000 2000 2000
Example client usage (large messages): fire-java gov.lbl.dsd.sea.nio.demo.PingPongBench
client localhost 9000 2000 1000000 2000 2000
Example server usage (micro messages): fire-java gov.lbl.dsd.sea.nio.demo.PingPongBench
server 9000 1 1
Example client usage (micro messages): fire-java gov.lbl.dsd.sea.nio.demo.PingPongBench
client localhost 9000 0.003 600 1 1
Using localhost with large messages should report on the order of 190 MB/s throughput
(appropriately large packet sizes and TCP buffer sizes are critical).
Using localhost with micro messages should report on the order of 30000 messages/s throughput.
Set log level to ERROR to avoid logging becoming the bottleneck!
- Version:
- $Revision: 1.5 $, $Date: 2004/09/16 16:57:15 $
PingPongBench
public PingPongBench(String[] args)
throws IOException
main
public static void main(String[] args)
throws IOException
- Throws:
IOException