Class UdpPerf

java.lang.Object
org.jgroups.tests.perf.UdpPerf

public class UdpPerf extends 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 Details

    • mcast_sock

      protected MulticastSocket mcast_sock
    • sock_addr

      protected SocketAddress sock_addr
    • receiver

      protected UdpPerf.Receiver receiver
    • 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 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 Details

    • UdpPerf

      public UdpPerf()
  • Method Details

    • start

      public void start() throws Exception
      Throws:
      Exception
    • loop

      protected void loop()
    • send

      protected void send(byte[] payload) throws Exception
      Throws:
      Exception
    • stop

      public void stop()
    • handleData

      protected void handleData()
    • reset

      void reset()
    • sendMessages

      protected void sendMessages()
    • main

      public static void main(String[] args)