Class NioClientTest


  • public class NioClientTest
    extends java.lang.Object
    NIO based client for measuring heap-based vs direct byte buffers. Use NioServerPerfTest as server
    Since:
    3.6.4
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  NioClientTest.Sender  
    • 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.ByteBuffer create​(int size, boolean direct)  
      static void main​(java.lang.String[] args)  
      protected void sendMessages​(java.net.InetAddress host, boolean direct, int num_threads)  
      protected void start​(java.net.InetAddress host, boolean direct, int num_threads)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • NioClientTest

        public NioClientTest()
    • 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