Class UdpPerf


  • public class UdpPerf
    extends java.lang.Object
    Dynamic tool to measure multicast performance of JGroups; every member sends N messages and we measure how long it takes for all receivers to receive them. MPerf is dynamic because it doesn't accept any configuration parameters (besides the channel config file and name); all configuration is done at runtime, and will be broadcast to all cluster members.
    Since:
    3.1
    • Field Detail

      • mcast_sock

        protected java.net.MulticastSocket mcast_sock
      • sock_addr

        protected java.net.SocketAddress sock_addr
      • num_msgs

        protected int num_msgs
      • msg_size

        protected int msg_size
      • num_threads

        protected int num_threads
      • log_interval

        protected int log_interval
      • receive_log_interval

        protected int receive_log_interval
      • total_received_msgs

        protected final java.util.concurrent.atomic.LongAdder total_received_msgs
        Maintains stats per sender, will be sent to perf originator when all messages have been received
      • looping

        protected boolean looping
      • last_interval

        protected long last_interval
    • Constructor Detail

      • UdpPerf

        public UdpPerf()
    • Method Detail

      • start

        public void start()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loop

        protected void loop()
      • send

        protected void send​(byte[] payload)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stop

        public void stop()
      • handleData

        protected void handleData()
      • reset

        void reset()
      • sendMessages

        protected void sendMessages()
      • main

        public static void main​(java.lang.String[] args)