Class DefaultTraversalMetrics
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalMetrics
- All Implemented Interfaces:
Serializable,TraversalMetrics
Default implementation for
TraversalMetrics that aggregates ImmutableMetrics instances from a
Traversal.- Author:
- Bob Briody (http://bobbriody.com), Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
- See Also:
-
Field Summary
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.util.TraversalMetrics
ELEMENT_COUNT_ID, PERCENT_DURATION_KEY, TRAVERSER_COUNT_ID -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTraversalMetrics(long totalStepDurationNs, List<MutableMetrics> orderedMetrics) This is only a convenient constructor needed for GraphSON deserialization. -
Method Summary
Modifier and TypeMethodDescriptionlonggetDuration(TimeUnit unit) Get the total duration taken by the Traversal.Gets all the metrics.getMetrics(int index) 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.booleanThe metrics have been computed and can no longer be modified.voidsetMetrics(Traversal.Admin traversal, boolean onGraphComputer) Extracts metrics from the providedTraversaland computes metrics.toString()
-
Constructor Details
-
DefaultTraversalMetrics
public DefaultTraversalMetrics() -
DefaultTraversalMetrics
This is only a convenient constructor needed for GraphSON deserialization.
-
-
Method Details
-
getDuration
Description copied from interface:TraversalMetricsGet the total duration taken by the Traversal.- Specified by:
getDurationin interfaceTraversalMetrics- Returns:
- total duration taken by the Traversal.
-
getMetrics
Description copied from interface:TraversalMetricsGet an individual Metrics object by the index of the profiled Step.- Specified by:
getMetricsin interfaceTraversalMetrics- Returns:
- an individual Metrics object.
-
getMetrics
Description copied from interface:TraversalMetricsGet an individual Metrics object by the id of the profiled Step.- Specified by:
getMetricsin interfaceTraversalMetrics- Returns:
- an individual Metrics object.
-
getMetrics
Description copied from interface:TraversalMetricsGets all the metrics.- Specified by:
getMetricsin interfaceTraversalMetrics
-
isFinalized
public boolean isFinalized()The metrics have been computed and can no longer be modified. -
toString
-
setMetrics
Extracts metrics from the providedTraversaland computes metrics. Calling this method finalizes the metrics such that their values can no longer be modified.
-