Skip to content

Commit

Permalink
perfomance matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Sep 15, 2023
1 parent 18a6acd commit 1fc6f7f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class BenchmarkSettings(BaseSettings):
requests: int = 100_000


class PerformaceMatrix:
requests: list[int] = [100, 10_000]
threads: list[int] = [1, 2, 5, 10, 20, 50]


benchmark = BenchmarkSettings()


Expand All @@ -40,9 +45,9 @@ async def test_performance() -> None:
settings.worker_empty_pause = 0
queue: Queue = Queue(RuntimeStorage())
worker: Worker = Worker(RuntimeLock(), queue)
for requests in [1000, 10_000, 100_000]:
for requests in PerformaceMatrix.requests:
benchmark.requests = requests
for threads in [1, 5, 10, 25]:
for threads in PerformaceMatrix.threads:
benchmark.threads = threads
print(f'test {requests} requests using {threads} thread(s)')
async with measure('registration'):
Expand Down

0 comments on commit 1fc6f7f

Please sign in to comment.