flakytest.dev anze3db fedidevs
Tests / accounts/tests.py

TestAccountIndexRobots::test_single_facet_is_indexable

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
4.76 s
median 4.93 s
max 12.10 s
Phases
Setup 4.29 s Call 466 ms Teardown 3 ms
Categories
Migrations 3.88 s Database 78 ms App code 2 ms Test code 0.11 ms Other (DB schema, Imports, Libraries, Templates, ...) 804 ms

597 database queries per run

Needs 16 MB of memory (max 31 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup1 ms0.4%
call310 ms97.7%
TestAccountIndexRobots.test_single_facet_is_indexableaccounts/tests.py:572 self.assert_indexable(url)304 ms96.0%
TestAccountIndexRobots.assert_indexableaccounts/tests.py:555 response = self.client.get(url)297 ms93.9%
Client.getdjango/test/client.py:1133297 ms93.9%
RequestFactory.getdjango/test/client.py:475297 ms93.9%
RequestFactory.genericdjango/test/client.py:671297 ms93.9%
Client.requestdjango/test/client.py:1091297 ms93.9%
ClientHandler.__call__django/test/client.py:186202 ms63.9%
BaseHandler.get_responsedjango/core/handlers/base.py:142202 ms63.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56202 ms63.9%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:123201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:145201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
MiddlewareMixin.__call__django/utils/deprecation.py:380201 ms63.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:56201 ms63.4%
BaseHandler._get_responsedjango/core/handlers/base.py:199201 ms63.4%
indexaccounts/views.py:425 return render(122 ms38.5%
renderdjango/shortcuts.py:27122 ms38.5%
render_to_stringdjango/template/loader.py:62122 ms38.5%
Template.renderdjango/template/backends/django.py:107122 ms38.5%
Template.renderdjango/template/base.py:175122 ms38.5%
instrumented_test_renderdjango/test/utils.py:113122 ms38.5%
NodeList.renderdjango/template/base.py:1108122 ms38.5%
Node.render_annotateddjango/template/base.py:1069122 ms38.5%
ExtendsNode.renderdjango/template/loader_tags.py:160122 ms38.5%
instrumented_test_renderdjango/test/utils.py:113122 ms38.5%
NodeList.renderdjango/template/base.py:1108122 ms38.5%
Node.render_annotateddjango/template/base.py:1069122 ms38.5%
BlockNode.renderdjango/template/loader_tags.py:6692 ms29.2%
NodeList.renderdjango/template/base.py:110892 ms29.2%
Node.render_annotateddjango/template/base.py:106992 ms29.2%
ForNode.renderdjango/template/defaulttags.py:24970 ms22.0%
Node.render_annotateddjango/template/base.py:106968 ms21.6%
IfNode.renderdjango/template/defaulttags.py:32623 ms7.2%
infix.<locals>.Operator.evaldjango/template/smartif.py:6123 ms7.2%
<lambda>django/template/smartif.py:10711 ms3.4%
TemplateLiteral.evaldjango/template/defaulttags.py:9187 ms2.1%
FilterExpression.resolvedjango/template/base.py:8067 ms2.1%
Variable.resolvedjango/template/base.py:9457 ms2.1%
Variable._resolve_lookupdjango/template/base.py:9805 ms1.7%
1 smaller frames hidden
<lambda>django/template/smartif.py:1068 ms2.5%
TemplateLiteral.evaldjango/template/defaulttags.py:9188 ms2.5%
FilterExpression.resolvedjango/template/base.py:8068 ms2.5%
Variable.resolvedjango/template/base.py:9458 ms2.5%
Variable._resolve_lookupdjango/template/base.py:9965 ms1.7%
2 smaller frames hidden
IfNode.renderdjango/template/defaulttags.py:33317 ms5.5%
NodeList.renderdjango/template/base.py:110817 ms5.5%
Node.render_annotateddjango/template/base.py:106917 ms5.5%
URLNode.renderdjango/template/defaulttags.py:51112 ms3.8%
reversedjango/urls/base.py:984 ms1.3%
URLResolver._reverse_with_prefixdjango/urls/resolvers.py:7644 ms1.3%
reversedjango/urls/base.py:444 ms1.3%
get_script_prefixdjango/urls/base.py:1354 ms1.3%
Local.__getattr__asgiref/local.py:1574 ms1.3%
reversedjango/urls/base.py:413 ms0.8%
1 smaller frames hidden
URLNode.renderdjango/template/defaulttags.py:4954 ms1.3%
1 smaller frames hidden
SimpleNode.renderdjango/template/library.py:34315 ms4.7%
querystringdjango/template/defaulttags.py:13485 ms1.7%
QueryDict.urlencodedjango/http/request.py:7405 ms1.7%
querystringdjango/template/defaulttags.py:13435 ms1.7%
ABCMeta.__instancecheck__<frozen abc>:1195 ms1.7%
querystringdjango/template/defaulttags.py:13274 ms1.3%
QueryDict.__init__django/http/request.py:6174 ms1.3%
parse_qsl<stdlib>/urllib/parse.py:9374 ms1.3%
StaticNode.renderdjango/templatetags/static.py:1165 ms1.7%
StaticNode.urldjango/templatetags/static.py:1135 ms1.7%
StaticNode.handle_simpledjango/templatetags/static.py:1295 ms1.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms1.7%
VariableNode.renderdjango/template/base.py:11735 ms1.7%
render_value_in_contextdjango/template/base.py:11473 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
IfNode.renderdjango/template/defaulttags.py:3228 ms2.5%
SimpleNode.renderdjango/template/library.py:3437 ms2.1%
heroicon_outlineheroicons/templatetags/heroicons.py:234 ms1.3%
_render_iconheroicons/templatetags/heroicons.py:414 ms1.3%
querystringdjango/template/defaulttags.py:13453 ms0.8%
QueryDict.setlistdjango/http/request.py:6843 ms0.8%
MultiValueDict.setlistdjango/utils/datastructures.py:1573 ms0.8%
IfNode.renderdjango/template/defaulttags.py:3337 ms2.1%
NodeList.renderdjango/template/base.py:11087 ms2.1%
Node.render_annotateddjango/template/base.py:10697 ms2.1%
SimpleNode.renderdjango/template/library.py:3437 ms2.1%
1 smaller frames hidden
IfNode.renderdjango/template/defaulttags.py:33319 ms5.9%
NodeList.renderdjango/template/base.py:110819 ms5.9%
Node.render_annotateddjango/template/base.py:106919 ms5.9%
IncludeNode.renderdjango/template/loader_tags.py:21115 ms4.7%
Template.renderdjango/template/base.py:17715 ms4.7%
instrumented_test_renderdjango/test/utils.py:11315 ms4.7%
NodeList.renderdjango/template/base.py:110815 ms4.7%
Node.render_annotateddjango/template/base.py:106915 ms4.7%
SimpleNode.renderdjango/template/library.py:34315 ms4.7%
instances_datalistaccounts/templatetags/account_extras.py:36 for instance in instances:15 ms4.7%
QuerySet.__iter__django/db/models/query.py:43915 ms4.7%
QuerySet._fetch_alldjango/db/models/query.py:226215 ms4.7%
FlatValuesListIterable.__iter__django/db/models/query.py:30215 ms4.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:157415 ms4.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162515 ms4.7%
CursorWrapper.executedjango/db/backends/utils.py:7915 ms4.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9215 ms4.7%
CursorWrapper._executedjango/db/backends/utils.py:10515 ms4.7%
Cursor.executepsycopg/cursor.py:11315 ms4.7%
Connection.waitpsycopg/connection.py:49515 ms4.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2068 ms2.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2868 ms2.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:788 ms2.5%
SimpleNode.renderdjango/template/library.py:3434 ms1.3%
heroicon_outlineheroicons/templatetags/heroicons.py:234 ms1.3%
_render_iconheroicons/templatetags/heroicons.py:414 ms1.3%
_render_iconheroicons/__init__.py:473 ms0.8%
deepcopy<stdlib>/copy.py:1373 ms0.8%
deepcopy<stdlib>/copy.py:1453 ms0.8%
1 smaller frames hidden
InclusionNode.renderdjango/template/library.py:3814 ms1.3%
tailwind_csstailwind/templatetags/tailwind_tags.py:234 ms1.3%
get_configtailwind/__init__.py:284 ms1.3%
LazySettings.__getattr__django/conf/__init__.py:1244 ms1.3%
URLNode.renderdjango/template/defaulttags.py:4993 ms0.8%
FilterExpression.resolvedjango/template/base.py:8213 ms0.8%
3 smaller frames hidden
indexaccounts/views.py:295 language_counts = Daily.objects.order_by("date").last()51 ms16.1%
QuerySet.lastdjango/db/models/query.py:122551 ms16.1%
QuerySet.__iter__django/db/models/query.py:43951 ms16.1%
QuerySet._fetch_alldjango/db/models/query.py:226251 ms16.1%
ModelIterable.__iter__django/db/models/query.py:10351 ms16.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:161240 ms12.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:76840 ms12.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:9039 ms12.3%
SQLCompiler.get_order_bydjango/db/models/sql/compiler.py:52839 ms12.3%
SQLCompiler.compiledjango/db/models/sql/compiler.py:57939 ms12.3%
OrderBy.as_sqldjango/db/models/expressions.py:197039 ms12.3%
1 smaller frames hidden
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162511 ms3.4%
CursorWrapper.executedjango/db/backends/utils.py:7911 ms3.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9211 ms3.4%
CursorWrapper._executedjango/db/backends/utils.py:1059 ms3.0%
Cursor.executepsycopg/cursor.py:1139 ms3.0%
Connection.waitpsycopg/connection.py:4959 ms3.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2067 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2867 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:787 ms2.1%
indexaccounts/views.py:412 page_obj = paginator.get_page(page_number)23 ms7.2%
CountlessPaginator.get_pageaccounts/views.py:8421 ms6.8%
CountlessPaginator.pageaccounts/views.py:9021 ms6.8%
CountlessPage.__init__accounts/views.py:28 self.object_list = list(self.object_list)21 ms6.8%
QuerySet.__iter__django/db/models/query.py:43921 ms6.8%
QuerySet._fetch_alldjango/db/models/query.py:226221 ms6.8%
ModelIterable.__iter__django/db/models/query.py:10321 ms6.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162516 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:7916 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9216 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:10516 ms5.1%
Cursor.executepsycopg/cursor.py:11316 ms5.1%
Connection.waitpsycopg/connection.py:49516 ms5.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16125 ms1.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7685 ms1.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:903 ms0.8%
SQLCompiler.get_order_bydjango/db/models/sql/compiler.py:4913 ms0.8%
SQLCompiler._order_by_pairsdjango/db/models/sql/compiler.py:3643 ms0.8%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:893 ms0.8%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:783 ms0.8%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3193 ms0.8%
indexaccounts/views.py:376 .only(4 ms1.3%
1 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:17394 ms29.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6394 ms29.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10494 ms29.6%
WhiteNoise.add_fileswhitenoise/base.py:10894 ms29.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12084 ms26.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13184 ms26.6%
WhiteNoise.get_static_filewhitenoise/base.py:21752 ms16.5%
StaticFile.__init__whitenoise/responders.py:7746 ms14.4%
StaticFile.get_alternativeswhitenoise/responders.py:20044 ms14.0%
__init____init__:-144 ms14.0%
Headers.__init__<stdlib>/wsgiref/headers.py:4443 ms13.5%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:5043 ms13.5%
1 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:734 ms1.3%
StaticFile.get_headerswhitenoise/responders.py:1763 ms0.8%
1 smaller frames hidden
2 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:21231 ms9.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:23331 ms9.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:17629 ms9.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:19729 ms9.3%
URLMixin.urldebug_toolbar/panels/staticfiles.py:2029 ms9.3%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:23528 ms8.9%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:20827 ms8.5%
urlsplit<stdlib>/urllib/parse.py:58225 ms8.0%
_urlsplit<stdlib>/urllib/parse.py:59825 ms8.0%
1 smaller frames hidden
1 smaller frames hidden
WhiteNoise.update_files_dictionarywhitenoise/base.py:1158 ms2.5%
scantreewhitenoise/base.py:2718 ms2.5%
scantreewhitenoise/base.py:2717 ms2.1%
scantreewhitenoise/base.py:2714 ms1.3%
scantreewhitenoise/base.py:2714 ms1.3%
scantreewhitenoise/base.py:2713 ms0.8%
1 smaller frames hidden
scantreewhitenoise/base.py:2733 ms0.8%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestAccountIndexRobots.assert_indexableaccounts/tests.py:557 self.assertNotContains(response, 'name="robots"')7 ms2.1%
SimpleTestCase.assertNotContainsdjango/test/testcases.py:6387 ms2.1%
SimpleTestCase._assert_containsdjango/test/testcases.py:5857 ms2.1%
TestAccountIndexRobots.test_single_facet_is_indexableaccounts/tests.py:571 with self.subTest(url=url):4 ms1.3%
teardown6 ms1.9%
TestCase.tearDownClassdjango/test/testcases.py:1458 conn.close()5 ms1.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:265 ms1.5%
BaseDatabaseWrapper.closedjango/db/backends/base/base.py:3555 ms1.5%
DatabaseWrapper._closedjango/db/backends/postgresql/base.py:4085 ms1.5%
Connection.closepsycopg/connection.py:2015 ms1.5%
Estimated from 238 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

accounts/views.py:425
return render(
index · Templates
107 ms
accounts/tests.py:555
response = self.client.get(url)
TestAccountIndexRobots.assert_indexable · Libraries
95 ms
accounts/views.py:295
language_counts = Daily.objects.order_by("date").last()
index · Database
51 ms
accounts/views.py:28
self.object_list = list(self.object_list)
CountlessPage.__init__ · Database
21 ms
accounts/templatetags/account_extras.py:36
for instance in instances:
instances_datalist · Database
15 ms
accounts/tests.py:557
self.assertNotContains(response, 'name="robots"')
TestAccountIndexRobots.assert_indexable · Libraries
7 ms
accounts/views.py:376
.only(
index · App code
4 ms
accounts/tests.py:571
with self.subTest(url=url):
TestAccountIndexRobots.test_single_facet_is_indexable · pytest
4 ms
accounts/views.py:412
page_obj = paginator.get_page(page_number)
index · App code
1 ms
fedidevs/middleware.py:76
if _is_private_request(request):
_is_publicly_cacheable · App code
1 ms

Fixtures

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

Database

20 queries · 30 ms

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

5×
SELECT "stats_daily"."id", "stats_daily"."date", "stats_daily"."total_accounts", "stats_daily"."python_accounts", "stats_daily"."javascript_accounts", "stats_daily"."typescript_accounts", "stats_daily"."rust_accounts", "stats_daily"."ruby_accounts", "stats_daily"."golang_accounts", "stats_daily"."j…
5×
SELECT "accounts_account"."id", "accounts_account"."account_id", "accounts_account"."instance", "accounts_account"."instance_model_id", "accounts_account"."username_at_instance", "accounts_account"."username", "accounts_account"."display_name", "accounts_account"."last_status_at", "accounts_account…
5×
SELECT "accounts_instance"."domain" AS "domain" FROM "accounts_instance" WHERE "accounts_instance"."deleted_at" IS NULL

Biggest pieces of work

call test body
accounts/tests.py:572
308 ms
teardown tearDownClass
django/test/testcases.py:1458
5 ms
call pytest internals 1 ms
teardown pytest internals 1 ms
setup __instancecheck__
<frozen abc>:119
0.68 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 317 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 119 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 325 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 331 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 149 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 6.64 s 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 6.38 s 615a272 main Profile
2 weeks, 6 days ago CI github-actions:test passed 4.93 s d923a46 main Profile
3 weeks ago CI github-actions:test passed 10.27 s 82997f8 main Profile
3 weeks ago CI github-actions:test passed 10.78 s 623aa3e main Profile
3 weeks ago CI github-actions:test passed 12.10 s ab6465a main Profile
3 weeks ago CI github-actions:test passed 388 ms 0c23747 main Run