Measure time in serialize benchmark