diff options
author | Yves Duhem <yves.duhem@mongodb.com> | 2018-12-10 17:10:02 -0500 |
---|---|---|
committer | Yves Duhem <yves.duhem@mongodb.com> | 2018-12-10 17:11:41 -0500 |
commit | 1108946e1c2fb8922c384fa5171165868b1162a8 (patch) | |
tree | cc8ce763db78fae9c8cd3ba8f6f8b11c7481fefe /buildscripts/client | |
parent | 8d91afc4ba367a300c819202abdf905e4f3d6646 (diff) | |
download | mongo-1108946e1c2fb8922c384fa5171165868b1162a8.tar.gz |
SERVER-38109 Use new Evergreen test stats API
Diffstat (limited to 'buildscripts/client')
-rw-r--r-- | buildscripts/client/evergreen.py | 8 |
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: |