aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/common.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-10-01 18:01:05 -0700
committerJames Taylor <user234683@users.noreply.github.com>2018-10-01 18:01:05 -0700
commitdd800485f0646fbaf49b9c65aa18fc4d18c62c5b (patch)
treed6d231f64d1fc3a24b3227fdd8e7743d722f693b /youtube/common.py
parent03f5ccbacb92313efa709aa8c07f9c1514edf504 (diff)
downloadyt-local-dd800485f0646fbaf49b9c65aa18fc4d18c62c5b.tar.lz
yt-local-dd800485f0646fbaf49b9c65aa18fc4d18c62c5b.tar.xz
yt-local-dd800485f0646fbaf49b9c65aa18fc4d18c62c5b.zip
add latency/readtime reporting for more things, round the numbers by reasonable amount
Diffstat (limited to 'youtube/common.py')
-rw-r--r--youtube/common.py2
1 files changed, 1 insertions, 1 deletions
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