add metrics concept

This commit is contained in:
2025-05-12 16:22:29 +03:00
parent c38fe10006
commit 8b06e9cd39
19 changed files with 57 additions and 123 deletions
+26
View File
@@ -0,0 +1,26 @@
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:
start = time()
with redirect_stdout(io.StringIO()):
app.pre_cycle_setup()
end = time()
return end - start