From dd800485f0646fbaf49b9c65aa18fc4d18c62c5b Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 1 Oct 2018 18:01:05 -0700 Subject: add latency/readtime reporting for more things, round the numbers by reasonable amount --- youtube/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube/common.py') diff --git a/youtube/common.py b/youtube/common.py index 76fd7c3..ae2ada1 100644 --- a/youtube/common.py +++ b/youtube/common.py @@ -168,7 +168,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None): content = response.read() read_finish = time.time() if report_text: - print(report_text, ' Latency:', response_time - start_time, ' Read time:', read_finish - response_time) + print(report_text, ' Latency:', round(response_time - start_time,3), ' Read time:', round(read_finish - response_time,3)) content = decode_content(content, response.getheader('Content-Encoding', default='identity')) return content -- cgit v1.2.3