Skip to content

Commit 75b9674

Browse files
Update benchmark.py
1 parent 8e74291 commit 75b9674

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

benchmark.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,31 +81,35 @@ async def uncached_func(x):
8181
return x
8282

8383

84-
funcs_ttl = [
85-
cached_func_ttl,
86-
cached_func_unbounded_ttl,
87-
Methods.cached_meth_ttl,
88-
Methods.cached_meth_unbounded_ttl,
89-
]
90-
all_funcs = [
84+
funcs_no_ttl [
9185
cached_func,
9286
cached_func_unbounded,
9387
Methods.cached_meth,
9488
Methods.cached_meth_unbounded,
95-
*funcs_ttl,
9689
]
97-
98-
ids = [
90+
no_ttl_ids = [
9991
"func-bounded",
10092
"func-unbounded",
10193
"meth-bounded",
10294
"meth-unbounded",
95+
]
96+
97+
funcs_ttl = [
98+
cached_func_ttl,
99+
cached_func_unbounded_ttl,
100+
Methods.cached_meth_ttl,
101+
Methods.cached_meth_unbounded_ttl,
102+
]
103+
ttl_ids = [
103104
"func-bounded-ttl",
104105
"func-unbounded-ttl",
105106
"meth-bounded-ttl",
106107
"meth-unbounded-ttl",
107108
]
108109

110+
all_funcs = [*funcs_no_ttl, *funcs_ttl]
111+
ids = [*no_ttl_ids, *ttl_ids]
112+
109113

110114
@pytest.mark.parametrize("func", all_funcs, ids=ids)
111115
def test_cache_hit_benchmark(

0 commit comments

Comments
 (0)