Class MetricEvent


  • public final class MetricEvent
    extends org.openstreetmap.atlas.event.Event
    A wrapper around a timed metric with a name and a Duration. This class is useful to generate in-memory metric events from integrity checks to the processors of integrity check results.
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricEvent​(java.lang.String name, org.openstreetmap.atlas.utilities.scalars.Duration duration)
      Default constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.openstreetmap.atlas.utilities.scalars.Duration getDuration()  
      java.lang.String getName()  
      static java.lang.String header()  
      java.lang.String toString()  
      • Methods inherited from class org.openstreetmap.atlas.event.Event

        getTimestamp
      • Methods inherited from class java.lang.Object

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

      • MetricEvent

        public MetricEvent​(java.lang.String name,
                           org.openstreetmap.atlas.utilities.scalars.Duration duration)
        Default constructor
        Parameters:
        name - name of metric
        duration - Duration of the metric
    • Method Detail

      • header

        public static java.lang.String header()
        Returns:
        header following toString() method format
      • getDuration

        public org.openstreetmap.atlas.utilities.scalars.Duration getDuration()
        Returns:
        Duration of the metric
      • getName

        public java.lang.String getName()
        Returns:
        name of the metric
      • toString

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