Interface TraversalMetrics
- All Known Implementing Classes:
DefaultTraversalMetrics
public interface TraversalMetrics
Contains the Metrics gathered for a Traversal as the result of the .profile()-step.
- Author:
- Bob Briody (http://bobbriody.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe MetricsId used to obtain the element count via Metrics.getCount(String countKey)static final StringThe annotation key used to obtain the percent duration via Metrics.getAnnotation(String key)static final StringThe MetricsId used to obtain the traverser count via Metrics.getCount(String countKey) -
Method Summary
Modifier and TypeMethodDescriptionlonggetDuration(TimeUnit unit) Get the total duration taken by the Traversal.Collection<? extends Metrics>Gets all the metrics.getMetrics(int stepIndex) Get an individual Metrics object by the index of the profiled Step.getMetrics(String id) Get an individual Metrics object by the id of the profiled Step.
-
Field Details
-
ELEMENT_COUNT_ID
The MetricsId used to obtain the element count via Metrics.getCount(String countKey)- See Also:
-
TRAVERSER_COUNT_ID
The MetricsId used to obtain the traverser count via Metrics.getCount(String countKey)- See Also:
-
PERCENT_DURATION_KEY
The annotation key used to obtain the percent duration via Metrics.getAnnotation(String key)- See Also:
-
-
Method Details
-
getDuration
Get the total duration taken by the Traversal.- Returns:
- total duration taken by the Traversal.
-
getMetrics
Get an individual Metrics object by the index of the profiled Step.- Returns:
- an individual Metrics object.
-
getMetrics
Get an individual Metrics object by the id of the profiled Step.- Returns:
- an individual Metrics object.
-
getMetrics
Collection<? extends Metrics> getMetrics()Gets all the metrics.
-