From 0acbf54e44c0854337c6e9a6425013d6992e091a Mon Sep 17 00:00:00 2001 From: kolo Date: Fri, 23 May 2025 22:12:12 +0300 Subject: [PATCH] first steps sor adding metrics tests --- metrics_tests/__init__.py | 0 .../get_time_of_pre_cycle_with_10k_commads.py | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 metrics_tests/__init__.py create mode 100644 metrics_tests/get_time_of_pre_cycle_with_10k_commads.py diff --git a/metrics_tests/__init__.py b/metrics_tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/metrics_tests/get_time_of_pre_cycle_with_10k_commads.py b/metrics_tests/get_time_of_pre_cycle_with_10k_commads.py new file mode 100644 index 0000000..afc667c --- /dev/null +++ b/metrics_tests/get_time_of_pre_cycle_with_10k_commads.py @@ -0,0 +1,18 @@ +from argenta.command import Command +from argenta.metrics import get_time_of_pre_cycle_setup +from argenta.response import Response +from argenta.router import Router +from argenta.app import App + + +router = Router() + +for i in range(10000): + @router.command(Command(f'cmd{i}', aliases=[f'cdr{i}', f'prt{i}'])) + def handler(response: Response): + pass + +app = App() +app.include_router(router) + +print(get_time_of_pre_cycle_setup(app))