Class DefaultTraversalMetrics

    • Constructor Detail

      • DefaultTraversalMetrics

        public DefaultTraversalMetrics()
      • DefaultTraversalMetrics

        public DefaultTraversalMetrics​(long totalStepDurationNs,
                                       List<MutableMetrics> orderedMetrics)
        This is only a convenient constructor needed for GraphSON deserialization.
    • Method Detail

      • getDuration

        public long getDuration​(TimeUnit unit)
        Description copied from interface: TraversalMetrics
        Get the total duration taken by the Traversal.
        Specified by:
        getDuration in interface TraversalMetrics
        Returns:
        total duration taken by the Traversal.
      • getMetrics

        public Metrics getMetrics​(int index)
        Description copied from interface: TraversalMetrics
        Get an individual Metrics object by the index of the profiled Step.
        Specified by:
        getMetrics in interface TraversalMetrics
        Returns:
        an individual Metrics object.
      • isFinalized

        public boolean isFinalized()
        The metrics have been computed and can no longer be modified.
      • setMetrics

        public void setMetrics​(Traversal.Admin traversal,
                               boolean onGraphComputer)
        Extracts metrics from the provided traversal and computes metrics. Calling this method finalizes the metrics such that their values can no longer be modified.