Closed JanPel closed 1 year ago
A PR would be 👌
FWIW I recently switched rocket_prometheus to use Instant::now()
instead of SystemTime::now()
so it might be worth making the same change here :slightly_smiling_face:
Okay done! Also changed SystemTIme to Instant.
Currently the timing of the reponse times seems off. I think because on line 355 and 356:
fut: self.service.call(req), clock: SystemTime::now(),
Is in the wrong order, so the processing of the request is started before the timer is initiated. Should be fixed by initiating the time before making the MetricsResponse object. If needed I am happy to make a pull request for this.