Class Measurement<E>

  • Type Parameters:
    E - the measuring point's type (i.e. the type of the probed element)

    public class Measurement<E>
    extends Object
    • Constructor Detail

      • Measurement

        public Measurement​(Object what,
                           MeasuringPoint<E> where,
                           Object who,
                           double value,
                           double when,
                           Metadata... metadata)
        Constructs a new measurement.
        Parameters:
        what - the measured metric or property (e.g. response time)
        where - the measuring point (e.g. a reference to the method whose response time is to be measured)
        who - the trigger, i.e. the element that caused this measurement (e.g. a specific process/thread/request)
        value - the measured value (unit could be stored as metadata, if desired)
        when - the point in time this measurement refers to
        metadata - optional data to characterize this measurement
    • Method Detail

      • getWhat

        public Object getWhat()
      • getWho

        public Object getWho()
      • getWhen

        public double getWhen()
      • getValue

        public double getValue()
      • getMetadata

        public Metadata[] getMetadata()
      • addMetadata

        public void addMetadata​(Metadata... globalMetadata)
      • addMetadata

        public void addMetadata​(List<Metadata> globalMetadata)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object