@Override
    public DefaultTraversalMetrics generateFinalResult(final DefaultTraversalMetrics tm) {
        if (this.onGraphComputer && !tm.isFinalized())
            tm.setMetrics(this.getTraversal(), true);
        return tm;
    }
@author Bob Briody (http://bobbriody.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/ProfileSideEffectStep.java