From 6cd4acd9c315b7a8aa8ae3821e35cc690663c648 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 28 May 2021 17:09:15 +0200 Subject: [PATCH] take time hls --- backend/stream.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/stream.py b/backend/stream.py index dfdc355..dd52d77 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -218,6 +218,7 @@ except Exception as e: logger.info(e) async def rewrite(upstream, current, proxy): + rewrite_start = (time.time_ns() // 1_000_000) ndata = None text = None try: @@ -268,6 +269,8 @@ async def rewrite(upstream, current, proxy): else: ndata += links.pop(0) ndata += "\n" + rewrite_stop = (time.time_ns() // 1_000_000) + logger.info(str(rewrite_stop - rewrite_start)) return ndata class MainHandler(tornado.web.RequestHandler):