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

ProjectPagesTest::test_htmx_refresh

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
51 ms
median 58 ms
max 90 ms
Phases
Setup 0.67 ms Call 51 ms Teardown 0.16 ms
Categories
Database 27 ms Other (Libraries, Unsampled, pytest, Deep copies, ...) 24 ms

30 database queries per run

Needs 3 KB of memory (max 8 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call38 ms98.1%
ProjectPagesTest.test_htmx_refreshapps/projects/tests.py:1147 response = self.client.get(self.project.url("htmx_refresh"))22 ms57.7%
Client.getdjango/test/client.py:112422 ms57.7%
RequestFactory.getdjango/test/client.py:47522 ms57.7%
RequestFactory.genericdjango/test/client.py:67122 ms57.7%
Client.requestdjango/test/client.py:108222 ms57.7%
ClientHandler.__call__django/test/client.py:17318 ms46.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6218 ms46.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10418 ms46.2%
WhiteNoise.add_fileswhitenoise/base.py:10818 ms46.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12016 ms40.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13116 ms40.4%
WhiteNoise.get_static_filewhitenoise/base.py:20816 ms40.4%
StaticFile.__init__whitenoise/responders.py:737 ms17.3%
StaticFile.get_headerswhitenoise/responders.py:1764 ms11.5%
formatdate<stdlib>/email/utils.py:2662 ms5.8%
StaticFile.get_headerswhitenoise/responders.py:1782 ms5.8%
parsedate<stdlib>/email/_parseaddr.py:1852 ms5.8%
StaticFile.__init__whitenoise/responders.py:774 ms11.5%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms11.5%
__init____init__:-12 ms5.8%
StaticFile.__init__whitenoise/responders.py:742 ms5.8%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms5.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms5.8%
scantreewhitenoise/base.py:2622 ms5.8%
scantreewhitenoise/base.py:2622 ms5.8%
scantreewhitenoise/base.py:2622 ms5.8%
ClientHandler.__call__django/test/client.py:1864 ms11.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1822 ms5.8%
BaseHandler.resolve_requestdjango/core/handlers/base.py:3142 ms5.8%
URLResolver.resolvedjango/urls/resolvers.py:6782 ms5.8%
URLResolver.resolvedjango/urls/resolvers.py:6782 ms5.8%
URLPattern.resolvedjango/urls/resolvers.py:4772 ms5.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms5.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:592 ms5.8%
htmx_refreshapps/projects/urls.py:6012 ms5.8%
managed_projectapps/projects/urls.py:61 project = get_object_or_404(2 ms5.8%
get_object_or_404django/shortcuts.py:902 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms5.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7922 ms5.8%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11592 ms5.8%
ProjectPagesTest.test_htmx_refreshapps/projects/tests.py:1149 response = self.client.get(self.project.url("htmx_refresh", self.ingest_run.number))7 ms17.3%
Client.getdjango/test/client.py:11247 ms17.3%
RequestFactory.getdjango/test/client.py:4757 ms17.3%
RequestFactory.genericdjango/test/client.py:6717 ms17.3%
Client.requestdjango/test/client.py:10827 ms17.3%
ClientHandler.__call__django/test/client.py:1864 ms11.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms11.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms11.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms11.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms5.8%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms5.8%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms5.8%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms5.8%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms5.8%
get_userdjango/contrib/auth/middleware.py:202 ms5.8%
get_userdjango/contrib/auth/__init__.py:3112 ms5.8%
_get_user_session_keydjango/contrib/auth/__init__.py:952 ms5.8%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms5.8%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms5.8%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms5.8%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms5.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:592 ms5.8%
htmx_refreshapps/projects/urls.py:6012 ms5.8%
managed_projectapps/projects/urls.py:61 project = get_object_or_404(2 ms5.8%
get_object_or_404django/shortcuts.py:902 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms5.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms5.8%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms5.8%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms5.8%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3002 ms5.8%
SQLCompiler.get_related_selectionsdjango/db/models/sql/compiler.py:12592 ms5.8%
SQLCompiler.get_default_columnsdjango/db/models/sql/compiler.py:10292 ms5.8%
Query.join_parent_modeldjango/db/models/sql/query.py:11922 ms5.8%
ClientHandler.__call__django/test/client.py:2062 ms5.8%
Signal.disconnectdjango/dispatch/dispatcher.py:1612 ms5.8%
ProjectPagesTest.setUpapps/projects/tests.py:954 self.client.force_login(self.user)4 ms11.5%
ClientMixin.force_logindjango/test/client.py:8554 ms11.5%
ClientMixin._logindjango/test/client.py:8762 ms5.8%
ClientMixin.sessiondjango/test/client.py:8122 ms5.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms5.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms5.8%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms5.8%
Atomic.__exit__django/db/transaction.py:2472 ms5.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.8%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms5.8%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
ClientMixin._logindjango/test/client.py:8812 ms5.8%
logindjango/contrib/auth/__init__.py:1872 ms5.8%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms5.8%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms5.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.8%
QuerySet.getdjango/db/models/query.py:6352 ms5.8%
QuerySet.__len__django/db/models/query.py:3722 ms5.8%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.8%
ModelIterable.__iter__django/db/models/query.py:952 ms5.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms5.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms5.8%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms5.8%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms5.8%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2552 ms5.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms11.5%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms5.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms5.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.8%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.8%
Cursor.executepsycopg/cursor.py:1132 ms5.8%
Connection.waitpsycopg/connection.py:4952 ms5.8%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms5.8%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms5.8%
Atomic.__exit__django/db/transaction.py:2832 ms5.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.8%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms5.8%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3702 ms5.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.8%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3202 ms5.8%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2982 ms5.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.8%
DatabaseWrapper.create_cursordjango/db/backends/postgresql/base.py:4302 ms5.8%
Connection.cursorpsycopg/connection.py:2592 ms5.8%
Estimated from 17 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:1147
response = self.client.get(self.project.url("htmx_refresh"))
ProjectPagesTest.test_htmx_refresh · Libraries
20 ms
apps/projects/tests.py:954
self.client.force_login(self.user)
ProjectPagesTest.setUp · Database
4 ms
apps/projects/urls.py:61
project = get_object_or_404(
managed_project · Database
4 ms
apps/projects/tests.py:1149
response = self.client.get(self.project.url("htmx_refresh", self.ingest_run.number))
ProjectPagesTest.test_htmx_refresh · Database
4 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.07 ms
_template_string_if_invalid_marker function 0.04 ms
monkeypatch function 0.03 ms
_django_db_marker function 0.03 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
_django_clear_site_cache function 0.02 ms

Database

30 queries · 7 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

3×
SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > %s AND "django_session"."session_key" = %s) LIMIT ?

Biggest pieces of work

call test body
apps/projects/tests.py:1147
29 ms
call setUp
apps/projects/tests.py:954
4 ms
call _post_teardown
django/test/testcases.py:1240
4 ms

Reliability

15 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 15 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 39 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 58 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 27 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 60 ms e141198 main Profile
1 month ago CI github-actions:test passed 27 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 52 ms afde85b main Profile
1 month ago CI github-actions:test passed 43 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 73 ms 044719a main Profile
1 month ago CI github-actions:test passed 35 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 90 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 60 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 60 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 59 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 30 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 59 ms 78a4357 main Profile