diff --git a/benchmarks/query_benchmarks/queryset_filter_chain/benchmark.py b/benchmarks/query_benchmarks/queryset_filter_chain/benchmark.py index 9f24df0f6c..61fedf4594 100644 --- a/benchmarks/query_benchmarks/queryset_filter_chain/benchmark.py +++ b/benchmarks/query_benchmarks/queryset_filter_chain/benchmark.py @@ -12,11 +12,15 @@ def time_filter_chain(self): Book.objects.filter(title="Talent").filter( description__icontains="top performers" ).filter(author_name__startswith="Geoff").filter( - date_created__lt=datetime.datetime(year=2010, month=1, day=1) + date_created__lt=datetime.datetime( + year=2010, month=1, day=1, tzinfo=datetime.timezone.utc + ) ).filter( - date_created__gte=datetime.date(year=2007, month=1, day=1) + date_created__gte=datetime.datetime( + year=2007, month=1, day=1, tzinfo=datetime.timezone.utc + ) ).filter( - date_published=datetime.datetime.now() + date_published=datetime.datetime.now(tz=datetime.timezone.utc) ).filter( enabled=True ) diff --git a/benchmarks/system_check_benchmarks/__init__.py b/benchmarks/system_check_benchmarks/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/benchmarks/system_check_benchmarks/run_checks/__init__.py b/benchmarks/system_check_benchmarks/run_checks/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/benchmarks/system_check_benchmarks/run_checks/benchmark.py b/benchmarks/system_check_benchmarks/run_checks/benchmark.py new file mode 100644 index 0000000000..66f5274bf0 --- /dev/null +++ b/benchmarks/system_check_benchmarks/run_checks/benchmark.py @@ -0,0 +1,11 @@ +from django.core.checks import run_checks + +from ...utils import bench_setup + + +class SystemChecks: + def setup(self): + bench_setup(migrate=True) + + def time_checks(self): + run_checks(include_deployment_checks=True, databases=("default",))