]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/blobdiff - store.py
Store duration in http requests
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git] / store.py
index 45a52339dc688bb9311451c476ec149b23f09a5f..0c018e017b062aed66fd558cafaa1ef10ed722d6 100644 (file)
--- a/store.py
+++ b/store.py
@@ -211,6 +211,7 @@ class ReportStore:
                 "body": body,
                 "headers": headers,
                 "status": response.status_code,
+                "duration": response.elapsed.total_seconds(),
                 "response": None,
                 "response_same_as": self.last_http["date"]
                 })
@@ -222,6 +223,7 @@ class ReportStore:
                 "body": body,
                 "headers": headers,
                 "status": response.status_code,
+                "duration": response.elapsed.total_seconds(),
                 "response": response.text,
                 "response_same_as": None,
                 })