Package org.jgroups.tests
Class NioClientTest
- java.lang.Object
-
- org.jgroups.tests.NioClientTest
-
public class NioClientTest extends java.lang.ObjectNIO based client for measuring heap-based vs direct byte buffers. UseNioServerPerfTestas server- Since:
- 3.6.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classNioClientTest.Sender
-
Field Summary
Fields Modifier and Type Field Description protected booleanrunningprotected NioClientTest.Sender[]sendersprotected java.util.concurrent.atomic.LongAddertotal_bytes_sentprotected java.util.concurrent.atomic.LongAddertotal_msgs
-
Constructor Summary
Constructors Constructor Description NioClientTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.nio.ByteBuffercreate(int size, boolean direct)static voidmain(java.lang.String[] args)protected voidsendMessages(java.net.InetAddress host, boolean direct, int num_threads)protected voidstart(java.net.InetAddress host, boolean direct, int num_threads)
-
-
-
Field Detail
-
running
protected volatile boolean running
-
total_bytes_sent
protected final java.util.concurrent.atomic.LongAdder total_bytes_sent
-
total_msgs
protected final java.util.concurrent.atomic.LongAdder total_msgs
-
senders
protected NioClientTest.Sender[] senders
-
-
Method Detail
-
create
protected static java.nio.ByteBuffer create(int size, boolean direct)
-
start
protected void start(java.net.InetAddress host, boolean direct, int num_threads) throws java.lang.Exception- Throws:
java.lang.Exception
-
sendMessages
protected void sendMessages(java.net.InetAddress host, boolean direct, int num_threads) throws java.lang.Exception- Throws:
java.lang.Exception
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
-