Add request duration middleware