public Optional<MutableMetrics> getMetrics() {
        if (this.traversal.isLocked()) this.initializeIfNeeded();
        return Optional.ofNullable(metrics);
    }
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