Tests / accounts/tests.py
TestSelectedInstance::test_selected_instance_slash_truncate
First seen 2 years, 10 months ago in 1cd3a8d
CI
github-actions:test
4 runs
Average
192 ms
median 208 ms
max 269 ms
max 269 ms
Phases
Setup 3 ms
Call 188 ms
Teardown 0.28 ms
Categories
Database 22 ms
App code 0.90 ms
Other (Libraries, Templates, Unsampled, pytest) 169 ms
13 database queries per run
Needs 15 KB of memory (max 24 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 9 hours ago ·
open run
call81 ms98.6%
CallInfo.from_call_pytest/runner.py:36181 ms98.6%
call_and_report.<locals>.<lambda>_pytest/runner.py:25081 ms98.6%
HookCaller.__call__pluggy/_hooks.py:51281 ms98.6%
PluginManager._hookexecpluggy/_manager.py:12081 ms98.6%
_multicallpluggy/_callers.py:12181 ms98.6%
pytest_runtest_call_pytest/runner.py:18481 ms98.6%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:61481 ms98.6%
SimpleTestCase.__call__django/test/testcases.py:31481 ms98.6%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36979 ms95.9%
TestCase.__call__<stdlib>/unittest/case.py:74779 ms95.9%
TestCase.run<stdlib>/unittest/case.py:69179 ms95.9%
TestCase._callTestMethod<stdlib>/unittest/case.py:63779 ms95.9%
TestSelectedInstance.test_selected_instance_slash_truncateaccounts/tests.py:232 response = self.client.get("/?selected_instance=https://mastodon.social/")77 ms93.2%
Client.getdjango/test/client.py:113377 ms93.2%
RequestFactory.getdjango/test/client.py:47577 ms93.2%
RequestFactory.genericdjango/test/client.py:67177 ms93.2%
Client.requestdjango/test/client.py:109177 ms93.2%
ClientHandler.__call__django/test/client.py:17354 ms65.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6354 ms65.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10454 ms65.8%
WhiteNoise.add_fileswhitenoise/base.py:10854 ms65.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11532 ms38.4%
scantreewhitenoise/base.py:27132 ms38.4%
scantreewhitenoise/base.py:27129 ms35.6%
scantreewhitenoise/base.py:27127 ms32.9%
scantreewhitenoise/base.py:27125 ms30.1%
scantreewhitenoise/base.py:27125 ms30.1%
scantreewhitenoise/base.py:27325 ms30.1%
<GC>~23 ms27.4%
scantreewhitenoise/base.py:2732 ms2.7%
scantreewhitenoise/base.py:2732 ms2.7%
scantreewhitenoise/base.py:2692 ms2.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12023 ms27.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13123 ms27.4%
WhiteNoise.get_static_filewhitenoise/base.py:21720 ms24.7%
StaticFile.__init__whitenoise/responders.py:7311 ms13.7%
StaticFile.get_headerswhitenoise/responders.py:1765 ms5.5%
formatdate<stdlib>/email/utils.py:2662 ms2.7%
StaticFile.get_headerswhitenoise/responders.py:1672 ms2.7%
StaticFile.get_headerswhitenoise/responders.py:1802 ms2.7%
StaticFile.__init__whitenoise/responders.py:777 ms8.2%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms2.7%
StaticFile.get_alternativeswhitenoise/responders.py:2032 ms2.7%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms2.7%
__init____init__:-12 ms2.7%
StaticFile.__init__whitenoise/responders.py:742 ms2.7%
parsedate<stdlib>/email/_parseaddr.py:1852 ms2.7%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms2.7%
_parsedate_tz<stdlib>/email/_parseaddr.py:1102 ms2.7%
WhiteNoise.get_static_filewhitenoise/base.py:2122 ms2.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2332 ms2.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms2.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms2.7%
ClientHandler.__call__django/test/client.py:18623 ms27.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14223 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38023 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12323 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14523 ms27.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5623 ms27.4%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38018 ms21.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5618 ms21.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19918 ms21.9%
indexaccounts/views.py:4127 ms8.2%
CountlessPaginator.get_pageaccounts/views.py:847 ms8.2%
CountlessPaginator.pageaccounts/views.py:907 ms8.2%
CountlessPage.__init__accounts/views.py:28 self.object_list = list(self.object_list)7 ms8.2%
QuerySet.__iter__django/db/models/query.py:4397 ms8.2%
QuerySet._fetch_alldjango/db/models/query.py:22627 ms8.2%
ModelIterable.__iter__django/db/models/query.py:1037 ms8.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms5.5%
CursorWrapper.executedjango/db/backends/utils.py:795 ms5.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms5.5%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1005 ms5.5%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms5.5%
Cursor.executepsycopg/cursor.py:1135 ms5.5%
Connection.waitpsycopg/connection.py:4955 ms5.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms5.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms5.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms5.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms2.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7682 ms2.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:892 ms2.7%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:782 ms2.7%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3102 ms2.7%
SQLCompiler.get_related_selectionsdjango/db/models/sql/compiler.py:12582 ms2.7%
indexaccounts/views.py:295 language_counts = Daily.objects.order_by("date").last()7 ms8.2%
QuerySet.lastdjango/db/models/query.py:12257 ms8.2%
QuerySet.__iter__django/db/models/query.py:4397 ms8.2%
QuerySet._fetch_alldjango/db/models/query.py:22627 ms8.2%
ModelIterable.__iter__django/db/models/query.py:1037 ms8.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms5.5%
CursorWrapper.executedjango/db/backends/utils.py:795 ms5.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms5.5%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms2.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.7%
Cursor.executepsycopg/cursor.py:1132 ms2.7%
Connection.waitpsycopg/connection.py:4952 ms2.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1022 ms2.7%
QueryStats.addflakytest/profiling/dbtrack.py:382 ms2.7%
normalize_sqlflakytest/profiling/dbtrack.py:242 ms2.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms2.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7682 ms2.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:892 ms2.7%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:782 ms2.7%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3192 ms2.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5792 ms2.7%
Col.as_sqldjango/db/models/expressions.py:13662 ms2.7%
indexaccounts/views.py:425 return render(5 ms5.5%
renderdjango/shortcuts.py:275 ms5.5%
render_to_stringdjango/template/loader.py:625 ms5.5%
Template.renderdjango/template/backends/django.py:1075 ms5.5%
Template.renderdjango/template/base.py:1755 ms5.5%
instrumented_test_renderdjango/test/utils.py:1135 ms5.5%
NodeList.renderdjango/template/base.py:11085 ms5.5%
Node.render_annotateddjango/template/base.py:10695 ms5.5%
ExtendsNode.renderdjango/template/loader_tags.py:1605 ms5.5%
instrumented_test_renderdjango/test/utils.py:1135 ms5.5%
NodeList.renderdjango/template/base.py:11085 ms5.5%
Node.render_annotateddjango/template/base.py:10695 ms5.5%
BlockNode.renderdjango/template/loader_tags.py:665 ms5.5%
NodeList.renderdjango/template/base.py:11085 ms5.5%
Node.render_annotateddjango/template/base.py:10692 ms2.7%
ForNode.renderdjango/template/defaulttags.py:2492 ms2.7%
Node.render_annotateddjango/template/base.py:10692 ms2.7%
VariableNode.renderdjango/template/base.py:11672 ms2.7%
FilterExpression.resolvedjango/template/base.py:8062 ms2.7%
Variable.resolvedjango/template/base.py:9452 ms2.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3825 ms5.5%
SessionMiddleware.process_responsedjango/contrib/sessions/middleware.py:605 ms5.5%
SessionStore.savedjango/contrib/sessions/backends/db.py:1215 ms5.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms2.7%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2012 ms2.7%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms2.7%
QuerySet.existsdjango/db/models/query.py:14582 ms2.7%
Query.has_resultsdjango/db/models/sql/query.py:6872 ms2.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15932 ms2.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms2.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.7%
Cursor.executepsycopg/cursor.py:1132 ms2.7%
Connection.waitpsycopg/connection.py:4952 ms2.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:3122 ms2.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms2.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms2.7%
Model.savedjango/db/models/base.py:9042 ms2.7%
Model.save_basedjango/db/models/base.py:9962 ms2.7%
Model._save_tabledjango/db/models/base.py:11992 ms2.7%
Model._do_insertdjango/db/models/base.py:12512 ms2.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.7%
QuerySet._insertdjango/db/models/query.py:21412 ms2.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms2.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms2.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.7%
Cursor.executepsycopg/cursor.py:1132 ms2.7%
Connection.waitpsycopg/connection.py:4952 ms2.7%
TestSelectedInstance.test_selected_instance_slash_truncateaccounts/tests.py:235 self.assertEqual(self.client.session["selected_instance"], "mastodon.social")2 ms2.7%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms2.7%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2542 ms2.7%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms2.7%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms2.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.7%
QuerySet.getdjango/db/models/query.py:7022 ms2.7%
QuerySet.__len__django/db/models/query.py:4212 ms2.7%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms2.7%
ModelIterable.__iter__django/db/models/query.py:1032 ms2.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms2.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.7%
Cursor.executepsycopg/cursor.py:1132 ms2.7%
Connection.waitpsycopg/connection.py:4952 ms2.7%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3722 ms2.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms2.7%
TestCase._fixture_teardowndjango/test/testcases.py:15002 ms2.7%
TestCase._rollback_atomicsdjango/test/testcases.py:14082 ms2.7%
Atomic.__exit__django/db/transaction.py:2952 ms2.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.7%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms2.7%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms2.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.7%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms2.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.7%
Cursor.executepsycopg/cursor.py:1132 ms2.7%
Connection.waitpsycopg/connection.py:4952 ms2.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.7%
teardown0.25 ms0.3%
Estimated from 37 samples; phase durations are exact. Frames from pytest and pluggy are
shown
.
Hot lines in your code
|
accounts/tests.py:232
response = self.client.get("/?selected_instance=https://mastodon.social/")
TestSelectedInstance.test_selected_instance_slash_truncate
· Libraries
|
59 ms |
|
accounts/views.py:28
self.object_list = list(self.object_list)
CountlessPage.__init__
· Database
|
7 ms |
|
accounts/views.py:295
language_counts = Daily.objects.order_by("date").last()
index
· Database
|
7 ms |
|
accounts/views.py:425
return render(
index
· Templates
|
5 ms |
|
accounts/tests.py:235
self.assertEqual(self.client.session["selected_instance"], "mastodon.social")
TestSelectedInstance.test_selected_instance_slash_truncate
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_isolate_apps function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.04 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.03 ms |
| monkeypatch function | 0.02 ms |
Database
13 queries · 5 msNo repeated queries.
Biggest pieces of work
|
call test body
accounts/tests.py:232
|
79 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
2 ms |
|
teardown sysmon_py_start
coverage/sysmon.py:365
|
0.25 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 50 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 9 hours ago | CI github-actions:test | passed | 82 ms | Profile |
| 9 hours ago | CI github-actions:test | passed | 269 ms | Profile |
| 9 hours ago | CI github-actions:test | passed | 204 ms | Profile |
| 14 hours ago | CI github-actions:test | passed | 212 ms | Profile |
| 14 hours ago | CI github-actions:test | passed | 92 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 114 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 174 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 175 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 185 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 188 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 183 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 171 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 177 ms | Run |
| 3 months, 3 weeks ago | CI github-actions | passed | 193 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 187 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 182 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 204 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 180 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 192 ms | Run |
| 3 months, 4 weeks ago | CI github-actions | passed | 184 ms | Run |