Package es.urjc.etsii.grafo.metrics
Class AbstractMetric
java.lang.Object
es.urjc.etsii.grafo.metrics.AbstractMetric
- Direct Known Subclasses:
DeclaredObjective
Base class to represent metrics
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final long
Reference instant to relativize all other timesData structure to store sorted time-value pairs -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
values
Data structure to store sorted time-value pairs -
referenceNanoTime
protected final long referenceNanoTimeReference instant to relativize all other times
-
-
Constructor Details
-
AbstractMetric
protected AbstractMetric(long referenceNanoTime)
-
-
Method Details
-
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
-
getReferenceNanoTime
public long getReferenceNanoTime()
-