start build pretty benchmarks

This commit is contained in:
2026-01-14 14:40:47 +03:00
parent 4957de95d3
commit b8d8c44bdd
7 changed files with 213 additions and 5 deletions
-2
View File
@@ -1,2 +0,0 @@
from argenta.metrics.main import \
get_time_of_pre_cycle_setup as get_time_of_pre_cycle_setup
-22
View File
@@ -1,22 +0,0 @@
__all__ = [
"get_time_of_pre_cycle_setup",
]
import io
from contextlib import redirect_stdout
from time import time
from argenta 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() # pyright: ignore[reportPrivateUsage]
end = time()
return end - start