Class AbstractMetric

java.lang.Object
es.urjc.etsii.grafo.metrics.AbstractMetric
Direct Known Subclasses:
DeclaredObjective

public abstract class AbstractMetric extends Object
Base class to represent metrics
  • Field Details

    • values

      protected final TreeSet<TimeValue> values
      Data structure to store sorted time-value pairs
    • referenceNanoTime

      protected final long referenceNanoTime
      Reference instant to relativize all other times
  • Constructor Details

    • AbstractMetric

      protected AbstractMetric(long referenceNanoTime)
  • Method Details

    • getName

      public String getName()
      What is the name of the current metric
      Returns:
      metric name, defaults to current class name if not overriden
    • add

      public void add(long instant, double value)
    • add

      public void add(double value)
    • getValues

      public TreeSet<TimeValue> getValues()
    • getReferenceNanoTime

      public long getReferenceNanoTime()