Skip to content

Commit 3fc3292

Browse files
committed
Add no-op test, probably best reference
1 parent 804c7fb commit 3fc3292

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/benchmark/pool/test_clear_time.py

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ def test_clear_sleep_by_task_number(benchmark, times, with_pool_server):
1111
benchmark(pool_server.run_benchmark_test, pool_server.queue_in, pool_server.queue_out, times)
1212

1313

14+
@pytest.mark.benchmark(group="by_task")
15+
@pytest.mark.parametrize('times', [1, 10, 100, 1000])
16+
def test_clear_no_op_by_task_number(benchmark, times, with_pool_server):
17+
with with_pool_server(4, function='lambda: None') as pool_server:
18+
benchmark(pool_server.run_benchmark_test, pool_server.queue_in, pool_server.queue_out, times)
19+
20+
1421
@pytest.mark.benchmark(group="by_worker_sleep")
1522
@pytest.mark.parametrize('workers', [1, 4, 12, 24, 50, 75])
1623
def test_clear_sleep_by_worker_count(benchmark, workers, with_pool_server):

0 commit comments

Comments
 (0)