flakytest.dev anze3db flakytest
Tests / apps/projects/tests.py

LegacyUrlTest::test_by_public_slug

First seen 7 hours ago in 78a4357
CI github-actions:test 5 runs
Average
50 ms
median 49 ms
max 78 ms
Phases
Setup 0.73 ms Call 49 ms Teardown 0.20 ms
Categories
Database 17 ms App code 1 ms Other (Libraries, pytest, Unsampled, Templates) 32 ms

10 database queries per run

Needs 380 KB of memory (max 560 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 19 minutes ago · open run
Show pytest frames
setup0.84 ms1.7%
call48 ms98.0%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:392 response = self.client.get(f"/projects/{self.public.slug}/runs/")28 ms56.7%
Client.getdjango/test/client.py:112428 ms56.7%
RequestFactory.getdjango/test/client.py:47528 ms56.7%
RequestFactory.genericdjango/test/client.py:67128 ms56.7%
Client.requestdjango/test/client.py:108228 ms56.7%
ClientHandler.__call__django/test/client.py:17328 ms56.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6228 ms56.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10425 ms51.6%
WhiteNoise.add_fileswhitenoise/base.py:10825 ms51.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12020 ms41.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13120 ms41.2%
WhiteNoise.get_static_filewhitenoise/base.py:20818 ms36.1%
StaticFile.__init__whitenoise/responders.py:7713 ms25.8%
StaticFile.get_alternativeswhitenoise/responders.py:20010 ms20.6%
__init____init__:-110 ms20.6%
Headers.__init__<stdlib>/wsgiref/headers.py:368 ms15.5%
<GC>~8 ms15.5%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:483 ms5.2%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms5.2%
StaticFile.__init__whitenoise/responders.py:735 ms10.3%
StaticFile.get_headerswhitenoise/responders.py:1763 ms5.2%
formatdate<stdlib>/email/utils.py:2663 ms5.2%
StaticFile.get_headerswhitenoise/responders.py:1683 ms5.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms10.3%
scantreewhitenoise/base.py:2625 ms10.3%
scantreewhitenoise/base.py:2625 ms10.3%
scantreewhitenoise/base.py:2623 ms5.2%
scantreewhitenoise/base.py:2623 ms5.2%
scantreewhitenoise/base.py:2623 ms5.2%
scantreewhitenoise/base.py:2603 ms5.2%
scantreewhitenoise/base.py:2643 ms5.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1113 ms5.2%
WhiteNoise.add_fileswhitenoise/base.py:1083 ms5.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1203 ms5.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1313 ms5.2%
WhiteNoise.get_static_filewhitenoise/base.py:2083 ms5.2%
StaticFile.__init__whitenoise/responders.py:773 ms5.2%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms5.2%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:39315 ms30.9%
SimpleTestCase.assertRedirectsdjango/test/testcases.py:50115 ms30.9%
Client.getdjango/test/client.py:112415 ms30.9%
RequestFactory.getdjango/test/client.py:47515 ms30.9%
RequestFactory.genericdjango/test/client.py:67115 ms30.9%
Client.requestdjango/test/client.py:108215 ms30.9%
ClientHandler.__call__django/test/client.py:18615 ms30.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14115 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13015 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12315 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3415 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms30.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19815 ms30.9%
project_runsapps/projects/urls.py:3463 ms5.2%
find_projectapps/projects/urls.py:49 project = get_object_or_404(3 ms5.2%
get_object_or_404django/shortcuts.py:903 ms5.2%
QuerySet.getdjango/db/models/query.py:6353 ms5.2%
QuerySet.__len__django/db/models/query.py:3723 ms5.2%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms5.2%
ModelIterable.__iter__django/db/models/query.py:953 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms5.2%
Cursor.executepsycopg/cursor.py:1133 ms5.2%
Connection.waitpsycopg/connection.py:4953 ms5.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms5.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms5.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms5.2%
project_runsapps/projects/urls.py:350 has_runs = Run.objects.filter(project=project).exists()3 ms5.2%
QuerySet.existsdjango/db/models/query.py:13373 ms5.2%
Query.has_resultsdjango/db/models/sql/query.py:6813 ms5.2%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15923 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms5.2%
Cursor.executepsycopg/cursor.py:1133 ms5.2%
Connection.waitpsycopg/connection.py:4953 ms5.2%
project_runsapps/projects/urls.py:360 run_statistics = runs.aggregate(3 ms5.2%
QuerySet.aggregatedjango/db/models/query.py:5943 ms5.2%
Query.get_aggregationdjango/db/models/sql/query.py:6323 ms5.2%
project_runsapps/projects/urls.py:367 page_obj = paginator.get_page(request.GET.get("page"))3 ms5.2%
Paginator.get_pagedjango/core/paginator.py:1683 ms5.2%
Paginator.validate_numberdjango/core/paginator.py:1603 ms5.2%
cached_property.__get__django/utils/functional.py:473 ms5.2%
Paginator.num_pagesdjango/core/paginator.py:1953 ms5.2%
cached_property.__get__django/utils/functional.py:473 ms5.2%
Paginator.countdjango/core/paginator.py:1893 ms5.2%
QuerySet.countdjango/db/models/query.py:6103 ms5.2%
Query.get_countdjango/db/models/sql/query.py:6513 ms5.2%
Query.get_aggregationdjango/db/models/sql/query.py:6333 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms5.2%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7923 ms5.2%
project_runsapps/projects/urls.py:368 page_runs = list(Run.objects.select_related("commit").filter(id__in=[p.id for p in page_obj]).annotate_counts())3 ms5.2%
QuerySet.__iter__django/db/models/query.py:3903 ms5.2%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms5.2%
ModelIterable.__iter__django/db/models/query.py:953 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms5.2%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms5.2%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms5.2%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms5.2%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3173 ms5.2%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms5.2%
Col.as_sqldjango/db/models/expressions.py:13233 ms5.2%
project_runsapps/projects/urls.py:377 for session in sessions:3 ms5.2%
QuerySet.__iter__django/db/models/query.py:3903 ms5.2%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms5.2%
ModelIterable.__iter__django/db/models/query.py:953 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms5.2%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms5.2%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms5.2%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms5.2%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3003 ms5.2%
SQLCompiler.get_related_selectionsdjango/db/models/sql/compiler.py:12443 ms5.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()5 ms10.3%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms5.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms5.2%
Cursor.executepsycopg/cursor.py:1133 ms5.2%
Connection.waitpsycopg/connection.py:4953 ms5.2%
TestCase._fixture_teardowndjango/test/testcases.py:14973 ms5.2%
TestCase._rollback_atomicsdjango/test/testcases.py:14053 ms5.2%
Atomic.__exit__django/db/transaction.py:2833 ms5.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms5.2%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4133 ms5.2%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3713 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms5.2%
Cursor.executepsycopg/cursor.py:1133 ms5.2%
Connection.waitpsycopg/connection.py:4953 ms5.2%
Estimated from 20 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:392
response = self.client.get(f"/projects/{self.public.slug}/runs/")
LegacyUrlTest.test_by_public_slug · Libraries
28 ms
apps/projects/urls.py:49
project = get_object_or_404(
find_project · Database
3 ms
apps/projects/urls.py:350
has_runs = Run.objects.filter(project=project).exists()
project_runs · Database
3 ms
apps/projects/urls.py:360
run_statistics = runs.aggregate(
project_runs · Database
3 ms
apps/projects/urls.py:367
page_obj = paginator.get_page(request.GET.get("page"))
project_runs · Database
3 ms
apps/projects/urls.py:368
page_runs = list(Run.objects.select_related("commit").filter(id__in=[p.id for p in page_obj]).annotate_counts())
project_runs · Database
3 ms
apps/projects/urls.py:377
for session in sessions:
project_runs · Database
3 ms

Fixtures

Exact setup time
_django_db_marker function 0.06 ms
_template_string_if_invalid_marker function 0.05 ms
_django_set_urlconf function 0.05 ms
_dj_autoclear_mailbox function 0.05 ms
_live_server_helper function 0.04 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.03 ms

Database

10 queries · 4 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:392
43 ms
call _post_teardown
django/test/testcases.py:1240
5 ms
setup pytest internals 0.84 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
19 minutes ago CI github-actions:test passed 49 ms 9caa567 main Profile
44 minutes ago CI github-actions:test passed 49 ms ec75501 main Profile
7 hours ago CI github-actions:test passed 49 ms d2c12e5 main Profile
7 hours ago CI github-actions:test passed 27 ms 0b902f6 main Profile
7 hours ago CI github-actions:test passed 78 ms 78a4357 main Profile