make pre_cycle_setup faster on 4 sec, start implemtnation disable redirect stdout in router

This commit is contained in:
2025-05-19 10:31:05 +03:00
parent 8b06e9cd39
commit 45f410e3e8
11 changed files with 53 additions and 27 deletions
+5 -5
View File
@@ -2,15 +2,15 @@ import io
from contextlib import redirect_stdout
from time import time
from argenta.router import Router
from argenta.command import Command
from argenta.response import Response
from argenta.response.status import Status
from argenta.command.flag import Flag, Flags
from argenta.app import App
def get_time_of_pre_cycle_setup(app: App) -> float:
"""
Public. Return time of pre cycle setup
:param app: app instance for testing time of pre cycle setup
:return: time of pre cycle setup as float
"""
start = time()
with redirect_stdout(io.StringIO()):
app.pre_cycle_setup()