This commit is contained in:
2025-05-27 14:19:54 +03:00
parent c2bbc5f15d
commit c8e0729be8
5 changed files with 28 additions and 40 deletions
+4 -32
View File
@@ -8,10 +8,10 @@ from argenta.app import App
class TimeOfPreCycleSetup:
@staticmethod
def ten_thousands_commands_with_two_aliases():
def commands_with_two_aliases(num_of_commands: int):
router = Router()
for i in range(10000):
for i in range(num_of_commands):
@router.command(Command(f'cmd{i}', aliases=[f'cdr{i}', f'prt{i}']))
def handler(response: Response):
pass
@@ -22,38 +22,10 @@ class TimeOfPreCycleSetup:
return get_time_of_pre_cycle_setup(app)
@staticmethod
def ten_thousands_commands_with_one_aliases():
def commands_with_one_aliases(num_of_commands: int):
router = Router()
for i in range(10000):
@router.command(Command(f'cmd{i}', aliases=[f'prt{i}']))
def handler(response: Response):
pass
app = App()
app.include_router(router)
return get_time_of_pre_cycle_setup(app)
@staticmethod
def one_hundred_thousands_commands_with_two_aliases():
router = Router()
for i in range(100000):
@router.command(Command(f'cmd{i}', aliases=[f'cdr{i}', f'prt{i}']))
def handler(response: Response):
pass
app = App()
app.include_router(router)
return get_time_of_pre_cycle_setup(app)
@staticmethod
def one_hundred_thousands_commands_with_one_aliases():
router = Router()
for i in range(100000):
for i in range(num_of_commands):
@router.command(Command(f'cmd{i}', aliases=[f'cdr{i}']))
def handler(response: Response):
pass