Class Profiler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected AverageMinMax avg  
      protected java.lang.String name  
      protected java.util.concurrent.TimeUnit unit  
    • Constructor Summary

      Constructors 
      Constructor Description
      Profiler​(java.lang.String name, java.util.concurrent.TimeUnit unit)
      Creates a Profiler instance which will reply to key 'name'.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Profiler add​(long time)  
      double average()  
      Profiler clear()  
      long count()  
      java.util.Map<java.lang.String,​java.lang.String> handleProbe​(java.lang.String... keys)
      Handles a probe.
      long max()  
      long min()  
      java.lang.String[] supportedKeys()
      Returns a list of supported keys
      java.lang.String toString()  
      protected static java.lang.String toString​(java.util.concurrent.TimeUnit unit)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected final java.lang.String name
      • unit

        protected final java.util.concurrent.TimeUnit unit
    • Constructor Detail

      • Profiler

        public Profiler​(java.lang.String name,
                        java.util.concurrent.TimeUnit unit)
        Creates a Profiler instance which will reply to key 'name'.
        Parameters:
        name - The name under which the profiler will register itself
        unit - The unit of measurement - only nanos, micros and millis are supported
    • Method Detail

      • add

        public Profiler add​(long time)
      • min

        public long min()
      • max

        public long max()
      • average

        public double average()
      • count

        public long count()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • handleProbe

        public java.util.Map<java.lang.String,​java.lang.String> handleProbe​(java.lang.String... keys)
        Description copied from interface: DiagnosticsHandler.ProbeHandler
        Handles a probe. For each key that is handled, the key and its result should be in the returned map.
        Specified by:
        handleProbe in interface DiagnosticsHandler.ProbeHandler
        Returns:
        Map. A map of keys and values. A null return value is permissible.
      • toString

        protected static java.lang.String toString​(java.util.concurrent.TimeUnit unit)