From 8640b9143fe21fe5e3b9cf34aa68764a381f06bc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 22 Jan 2025 11:47:45 -1000 Subject: [PATCH] chore: adjust cache benchmark to better reflect real cache data --- tests/benchmarks/test_cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/benchmarks/test_cache.py b/tests/benchmarks/test_cache.py index 051c1e47..6fde9438 100644 --- a/tests/benchmarks/test_cache.py +++ b/tests/benchmarks/test_cache.py @@ -15,7 +15,7 @@ def test_add_expire_1000_records(benchmark: BenchmarkFixture) -> None: class_=_CLASS_IN, ttl=60, alias=f"test{id}.local.", - created=now, + created=now + id, ) for id in range(1000) ] @@ -23,7 +23,7 @@ def test_add_expire_1000_records(benchmark: BenchmarkFixture) -> None: @benchmark def _expire_records() -> None: cache.async_add_records(records) - cache.async_expire(now + 61_000) + cache.async_expire(now + 100_000) def test_expire_no_records_to_expire(benchmark: BenchmarkFixture) -> None: @@ -37,7 +37,7 @@ def test_expire_no_records_to_expire(benchmark: BenchmarkFixture) -> None: class_=_CLASS_IN, ttl=60, alias=f"test{id}.local.", - created=now, + created=now + id, ) for id in range(1000) )