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

TestForAgentsAndCrawlers::test_sitemap

First seen 1 month ago in b3fedae
CI github-actions:test 9 runs
Average
40 ms
median 37 ms
max 73 ms
Phases
Setup 0.62 ms Call 39 ms Teardown 1 ms
Categories
Database 3 ms Test code 0.28 ms Other (Libraries, Templates, Unsampled, pytest) 37 ms

5 database queries per run

Needs 331 KB of memory (max 468 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call27 ms96.0%
TestForAgentsAndCrawlers.test_sitemapapps/guides/tests.py:175 response = self.client.get("/sitemap.xml")20 ms69.9%
Client.getdjango/test/client.py:112417 ms61.1%
RequestFactory.getdjango/test/client.py:47517 ms61.1%
RequestFactory.genericdjango/test/client.py:67117 ms61.1%
Client.requestdjango/test/client.py:108215 ms52.4%
ClientHandler.__call__django/test/client.py:17310 ms34.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:627 ms26.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1047 ms26.2%
WhiteNoise.add_fileswhitenoise/base.py:1087 ms26.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms26.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms26.2%
WhiteNoise.get_static_filewhitenoise/base.py:2035 ms17.5%
WhiteNoise.add_cache_headerswhitenoise/base.py:2245 ms17.5%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms17.5%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms17.5%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms17.5%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms8.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1842 ms8.7%
WhiteNoise.get_static_filewhitenoise/base.py:2082 ms8.7%
StaticFile.__init__whitenoise/responders.py:722 ms8.7%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms8.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:962 ms8.7%
convert_exception_to_responsedjango/core/handlers/exception.py:372 ms8.7%
ClientHandler.__call__django/test/client.py:1865 ms17.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1415 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1305 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:345 ms17.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms17.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms8.7%
make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._view_wrapperdjango/utils/decorators.py:1902 ms8.7%
x_robots_tag.<locals>.innerdjango/contrib/sitemaps/views.py:232 ms8.7%
sitemapdjango/contrib/sitemaps/views.py:1172 ms8.7%
Sitemap.get_urlsdjango/contrib/sitemaps/__init__.py:1062 ms8.7%
Sitemap._urlsdjango/contrib/sitemaps/__init__.py:1262 ms8.7%
Sitemap._locationdjango/contrib/sitemaps/__init__.py:712 ms8.7%
BaseHandler._get_responsedjango/core/handlers/base.py:2212 ms8.7%
SimpleTemplateResponse.renderdjango/template/response.py:1142 ms8.7%
SimpleTemplateResponse.rendered_contentdjango/template/response.py:922 ms8.7%
Template.renderdjango/template/backends/django.py:1072 ms8.7%
Template.renderdjango/template/base.py:1742 ms8.7%
instrumented_test_renderdjango/test/utils.py:1142 ms8.7%
NodeList.renderdjango/template/base.py:10912 ms8.7%
Node.render_annotateddjango/template/base.py:10522 ms8.7%
SpacelessNode.renderdjango/template/defaulttags.py:4542 ms8.7%
NodeList.renderdjango/template/base.py:10912 ms8.7%
Node.render_annotateddjango/template/base.py:10522 ms8.7%
ForNode.renderdjango/template/defaulttags.py:2492 ms8.7%
Node.render_annotateddjango/template/base.py:10522 ms8.7%
IfNode.renderdjango/template/defaulttags.py:3332 ms8.7%
NodeList.renderdjango/template/base.py:10912 ms8.7%
Node.render_annotateddjango/template/base.py:10522 ms8.7%
VariableNode.renderdjango/template/base.py:11502 ms8.7%
FilterExpression.resolvedjango/template/base.py:8152 ms8.7%
datedjango/template/defaultfilters.py:7892 ms8.7%
Client.requestdjango/test/client.py:10772 ms8.7%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()2 ms8.7%
TestCase._fixture_setupdjango/test/testcases.py:14782 ms8.7%
TestCase._enter_atomicsdjango/test/testcases.py:13962 ms8.7%
Atomic.__enter__django/db/transaction.py:2112 ms8.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms8.7%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms8.7%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms8.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms8.7%
Cursor.executepsycopg/cursor.py:1132 ms8.7%
Connection.waitpsycopg/connection.py:4952 ms8.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms8.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms8.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms8.7%
TestForAgentsAndCrawlers.test_sitemapapps/guides/tests.py:174 def test_sitemap(self):2 ms8.7%
SysMonitor.sysmon_py_startcoverage/sysmon.py:3652 ms8.7%
bytes_to_linescoverage/sysmon.py:1952 ms8.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms8.7%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms8.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms8.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms8.7%
Cursor.executepsycopg/cursor.py:1132 ms8.7%
Connection.waitpsycopg/connection.py:4952 ms8.7%
teardown0.53 ms1.9%
TestCase.tearDownClassdjango/test/testcases.py:1453 cls._rollback_atomics(cls.cls_atomics)0.53 ms1.9%
TestCase._rollback_atomicsdjango/test/testcases.py:14050.53 ms1.9%
Atomic.__exit__django/db/transaction.py:2950.53 ms1.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.53 ms1.9%
BaseDatabaseWrapper.rollbackdjango/db/backends/base/base.py:3370.53 ms1.9%
BaseDatabaseWrapper._rollbackdjango/db/backends/base/base.py:3080.53 ms1.9%
Estimated from 12 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/guides/tests.py:175
response = self.client.get("/sitemap.xml")
TestForAgentsAndCrawlers.test_sitemap · Libraries
20 ms
apps/guides/tests.py:174
def test_sitemap(self):
TestForAgentsAndCrawlers.test_sitemap · Libraries
2 ms

Fixtures

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

Database

5 queries · 0.42 ms
No repeated queries.

Biggest pieces of work

call test body
apps/guides/tests.py:174
22 ms
call _pre_setup
django/test/testcases.py:1164
2 ms
call _post_teardown
django/test/testcases.py:1240
2 ms
teardown tearDownClass
django/test/testcases.py:1453
0.53 ms

Reliability

9 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 9 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 28 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 44 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 25 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 37 ms e141198 main Profile
1 month ago CI github-actions:test passed 24 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 73 ms afde85b main Profile
1 month ago CI github-actions:test passed 39 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 66 ms 044719a main Profile
1 month ago CI github-actions:test passed 27 ms b3fedae main Profile