@Override
        public <I extends InputShim> TraversalMetrics read(final KryoShim<I, ?> kryo, final I input, final Class<TraversalMetrics> clazz) {
            final double duration = input.readDouble();
            final int size = input.readInt();

            final List<MutableMetrics> orderedMetrics = new ArrayList<>();
            for (int ix = 0; ix < size; ix++) {
                orderedMetrics.add(kryo.readObject(input, MutableMetrics.class));
            }

            return new DefaultTraversalMetrics(Math.round(duration * 1000000), orderedMetrics);
        }
Serializes any {@link Path} implementation encountered to an {@link DetachedPath}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoSerializersV3.java