Class RTT


  • public class RTT
    extends java.lang.Object
    Measures round-trip times (RTT) between nodes
    Since:
    5.4, 5.3.8
    Author:
    Bela Ban
    • Field Detail

      • transport

        protected TP transport
      • tp_id

        protected short tp_id
      • enabled

        protected boolean enabled
      • num_reqs

        protected int num_reqs
      • timeout

        protected long timeout
      • size

        protected int size
      • oob

        protected boolean oob
      • times

        protected final java.util.Map<Address,​long[]> times
    • Constructor Detail

      • RTT

        public RTT()
    • Method Detail

      • enabled

        public boolean enabled()
      • enabled

        public RTT enabled​(boolean f)
      • numReqs

        public int numReqs()
      • numReqs

        public RTT numReqs​(int n)
      • timeout

        public long timeout()
      • timeout

        public RTT timeout​(long t)
      • size

        public int size()
      • size

        public RTT size​(int size)
      • oob

        public boolean oob()
      • oob

        public RTT oob​(boolean b)
      • init

        public void init​(TP tp)
      • rtt

        public java.lang.String rtt()
      • rtt

        public java.lang.String rtt​(int num_reqs,
                                    boolean details)
        Sends N requests to all members and computes RTTs
        Parameters:
        num_reqs - The number of requests to be sent to all members
        details - Whether to print details (e.g. min/max/percentiles)
      • rtt

        public java.lang.String rtt​(int num_reqs,
                                    int size,
                                    boolean details,
                                    boolean exclude_self)
        Sends N requests to all members and computes RTTs
        Parameters:
        num_reqs - The number of requests to be sent to all members
        size - The number of bytes a request should have
        details - Whether to print details (e.g. min/max/percentiles)
        exclude_self - Whether to exclude the local node
      • _rtt

        public java.util.Map<Address,​AverageMinMax> _rtt​(int num_reqs,
                                                               int size,
                                                               boolean exclude_self)
      • handleMessage

        public void handleMessage​(Message msg,
                                  TpHeader hdr)
        Called when a message (request or response) is received
      • handleRequest

        protected void handleRequest​(Address sender,
                                     TpHeader hdr)
      • handleResponse

        protected void handleResponse​(Address sender,
                                      int index)
      • print

        protected static java.lang.String print​(AverageMinMax avg,
                                                boolean details,
                                                java.util.concurrent.TimeUnit unit,
                                                int num_reqs)
      • percentiles

        protected static java.lang.String percentiles​(AverageMinMax avg,
                                                      int num_reqs)