Revert "add raw request timings to provider send functions"

This reverts commit f2f2509c9b.
Raw request stats were added to investigate a hunch about a
performance issue we were seeing [1], but turned out not to
be relevant. We don't use them anymore so we can tidy up.

[1]: https://github.com/alphagov/notifications-api/pull/2858
This commit is contained in:
Ben Thorner
2021-10-28 11:12:18 +01:00
parent 32873ef70f
commit 3eeba0266b
3 changed files with 0 additions and 27 deletions

View File

@@ -107,7 +107,6 @@ class MMGClient(SmsClient):
"multi": multi
}
response = None
start_time = monotonic()
try:
response = request(
@@ -134,9 +133,6 @@ class MMGClient(SmsClient):
finally:
elapsed_time = monotonic() - start_time
self.statsd_client.timing("clients.mmg.request-time", elapsed_time)
if response and hasattr(response, 'elapsed'):
self.statsd_client.timing("clients.mmg.raw-request-time", response.elapsed.total_seconds())
self.current_app.logger.info("MMG request for {} finished in {}".format(reference, elapsed_time))
return response