mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
make pre_cycle_setup faster on 4 sec, start implemtnation disable redirect stdout in router
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user