@Override
    public Traverser.Admin<S> next() {
        Traverser.Admin<S> start = null;
        this.initializeIfNeeded();
        this.metrics.start();
        try {
            start = super.next();
            return start;
        } finally {
            if (start != null) {
                this.metrics.finish(start.bulk());
                if (this.onGraphComputer) {
                    this.getTraversal().getSideEffects().add(this.getId(), this.metrics);
                    this.metrics = null;
                }
            } else {
                this.metrics.stop();
                if (this.onGraphComputer) {
                    this.getTraversal().getSideEffects().add(this.getId(), this.metrics);
                    this.metrics = null;
                }
            }
        }
    }
Returns {@code Optional.empty()} if traversal is not iterated or if not locked after strategy application.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/ProfileStep.java