Tests / accounts/tests.py
TestSelectedInstance::test_no_selected_instance
First seen 3 years ago in 1cd3a8d
CI
github-actions:test
13 runs
Average
151 ms
median 147 ms
max 385 ms
max 385 ms
Phases
Setup 2 ms
Call 149 ms
Teardown 0.59 ms
Categories
Database 29 ms
App code 0.09 ms
Other (Libraries, Templates, pytest, Unsampled) 123 ms
12 database queries per run
Needs 1 MB of memory (max 1 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup0.81 ms1.1%
call69 ms95.7%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:157 response = self.client.get("/?q=")61 ms84.4%
Client.getdjango/test/client.py:113361 ms84.4%
RequestFactory.getdjango/test/client.py:47561 ms84.4%
RequestFactory.genericdjango/test/client.py:67161 ms84.4%
Client.requestdjango/test/client.py:109161 ms84.4%
ClientHandler.__call__django/test/client.py:17361 ms84.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6361 ms84.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10461 ms84.4%
WhiteNoise.add_fileswhitenoise/base.py:10861 ms84.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12045 ms61.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13145 ms61.9%
WhiteNoise.get_static_filewhitenoise/base.py:21732 ms45.0%
StaticFile.__init__whitenoise/responders.py:7716 ms22.5%
StaticFile.get_alternativeswhitenoise/responders.py:20016 ms22.5%
__init____init__:-112 ms16.9%
Headers.__init__<stdlib>/wsgiref/headers.py:448 ms11.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:504 ms5.6%
StaticFile.__init__whitenoise/responders.py:768 ms11.3%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1894 ms5.6%
Headers.__getitem__<stdlib>/wsgiref/headers.py:834 ms5.6%
StaticFile.__init__whitenoise/responders.py:734 ms5.6%
StaticFile.get_headerswhitenoise/responders.py:1764 ms5.6%
WhiteNoise.get_static_filewhitenoise/base.py:21212 ms16.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:23312 ms16.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:17612 ms16.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:19712 ms16.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:208 ms11.3%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2354 ms5.6%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2294 ms5.6%
unquote<stdlib>/urllib/parse.py:8464 ms5.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11516 ms22.5%
scantreewhitenoise/base.py:27112 ms16.9%
scantreewhitenoise/base.py:27112 ms16.9%
scantreewhitenoise/base.py:27312 ms16.9%
scantreewhitenoise/base.py:2734 ms5.6%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()4 ms5.6%
TestCase._fixture_setupdjango/test/testcases.py:14814 ms5.6%
TestCase._enter_atomicsdjango/test/testcases.py:13994 ms5.6%
Atomic.__enter__django/db/transaction.py:2234 ms5.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:264 ms5.6%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4004 ms5.6%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3674 ms5.6%
CursorWrapper.executedjango/db/backends/utils.py:794 ms5.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms5.6%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms5.6%
Cursor.executepsycopg/cursor.py:1134 ms5.6%
Connection.waitpsycopg/connection.py:4954 ms5.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms5.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms5.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms5.6%
TestSelectedInstance.test_no_selected_instanceaccounts/tests.py:160 self.assertIsNone(self.client.session.get("selected_instance"))4 ms5.6%
ClientMixin.sessiondjango/test/client.py:8154 ms5.6%
SessionStore.savedjango/contrib/sessions/backends/db.py:1214 ms5.6%
SessionStore.createdjango/contrib/sessions/backends/db.py:704 ms5.6%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2014 ms5.6%
SessionStore.existsdjango/contrib/sessions/backends/db.py:634 ms5.6%
QuerySet.existsdjango/db/models/query.py:14584 ms5.6%
Query.has_resultsdjango/db/models/sql/query.py:6874 ms5.6%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15934 ms5.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms5.6%
CursorWrapper.executedjango/db/backends/utils.py:794 ms5.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms5.6%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms5.6%
Cursor.executepsycopg/cursor.py:1134 ms5.6%
Connection.waitpsycopg/connection.py:4954 ms5.6%
Estimated from 18 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
accounts/tests.py:157
response = self.client.get("/?q=")
TestSelectedInstance.test_no_selected_instance
· Libraries
|
61 ms |
|
accounts/tests.py:160
self.assertIsNone(self.client.session.get("selected_instance"))
TestSelectedInstance.test_no_selected_instance
· Database
|
4 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _live_server_helper function | 0.04 ms |
| _django_db_marker function | 0.04 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
12 queries · 8 msNo repeated queries.
Biggest pieces of work
|
call test body
accounts/tests.py:157
|
65 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
4 ms |
| setup pytest internals | 0.81 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 72 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 177 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 152 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 55 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 178 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 147 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 86 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 129 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 170 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 69 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 126 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 220 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 385 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 117 ms | Run |