summaryrefslogtreecommitdiff
path: root/buildscripts/client
diff options
context:
space:
mode:
authorYves Duhem <yves.duhem@mongodb.com>2018-12-10 17:10:02 -0500
committerYves Duhem <yves.duhem@mongodb.com>2018-12-10 17:11:41 -0500
commit1108946e1c2fb8922c384fa5171165868b1162a8 (patch)
treecc8ce763db78fae9c8cd3ba8f6f8b11c7481fefe /buildscripts/client
parent8d91afc4ba367a300c819202abdf905e4f3d6646 (diff)
downloadmongo-1108946e1c2fb8922c384fa5171165868b1162a8.tar.gz
SERVER-38109 Use new Evergreen test stats API
Diffstat (limited to 'buildscripts/client')
-rw-r--r--buildscripts/client/evergreen.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/buildscripts/client/evergreen.py b/buildscripts/client/evergreen.py
index 6e68b5d08b6..3cc7493240a 100644
--- a/buildscripts/client/evergreen.py
+++ b/buildscripts/client/evergreen.py
@@ -145,8 +145,12 @@ class EvergreenApiV2(EvergreenApi):
def _call_api(self, url, params=None):
start_time = time.time()
response = self.session.get(url=url, params=params)
- LOGGER.debug("Request %s took %fs:", response.request.url, round(
- time.time() - start_time, 2))
+ duration = round(time.time() - start_time, 2)
+ if duration > 10:
+ # If the request took over 10 seconds, increase the log level.
+ LOGGER.info("Request %s took %fs:", response.request.url, duration)
+ else:
+ LOGGER.debug("Request %s took %fs:", response.request.url, duration)
try:
response.raise_for_status()
except requests.exceptions.HTTPError as err: