@Override
        public <O extends OutputShim> void write(final KryoShim<?, O> kryo, final O output, final TraversalMetrics object) {
            output.writeDouble(object.getDuration(TimeUnit.NANOSECONDS) / 1000000d);
            final Collection<? extends Metrics> metrics = object.getMetrics();
            output.writeInt(metrics.size());
            metrics.forEach(m -> kryo.writeObject(output, m));
        }
Serializes any {@link Path} implementation encountered to an {@link DetachedPath}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3.java