Tests / mastodon_auth/tests.py
MastodonLoginViewTests::test_create_app_rate_limited_reuses_existing_credentials
First seen 5 months ago in 553d048
CI
github-actions:test
13 runs
Average
93 ms
median 84 ms
max 192 ms
max 192 ms
Phases
Setup 1 ms
Call 92 ms
Teardown 0.28 ms
Categories
Database 14 ms
Other (Mocking, pytest, Unsampled, Cache, ...) 79 ms
8 database queries per run
Needs 12 KB of memory (max 76 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup1 ms1.1%
call91 ms98.6%
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentialsmastodon_auth/tests.py:148 response = self.client.post("/mastodon_login/", {"instance": "det.social"})40 ms43.5%
Client.postdjango/test/client.py:116240 ms43.5%
RequestFactory.postdjango/test/client.py:49940 ms43.5%
RequestFactory.genericdjango/test/client.py:67140 ms43.5%
Client.requestdjango/test/client.py:109140 ms43.5%
ClientHandler.__call__django/test/client.py:17340 ms43.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6340 ms43.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10440 ms43.5%
WhiteNoise.add_fileswhitenoise/base.py:10840 ms43.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12035 ms38.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13134 ms37.1%
WhiteNoise.get_static_filewhitenoise/base.py:21715 ms16.7%
StaticFile.__init__whitenoise/responders.py:777 ms7.7%
StaticFile.get_alternativeswhitenoise/responders.py:2005 ms5.1%
__init____init__:-15 ms5.1%
Headers.__init__<stdlib>/wsgiref/headers.py:445 ms5.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:504 ms3.8%
StaticFile.get_alternativeswhitenoise/responders.py:2071 ms1.3%
StaticFile.get_alternativeswhitenoise/responders.py:2011 ms1.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:641 ms1.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.3%
StaticFile.__init__whitenoise/responders.py:764 ms3.8%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms2.6%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms2.6%
Headers.get<stdlib>/wsgiref/headers.py:1062 ms2.6%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1881 ms1.3%
StaticFile.__init__whitenoise/responders.py:734 ms3.8%
StaticFile.get_headerswhitenoise/responders.py:1701 ms1.3%
StaticFile.get_headerswhitenoise/responders.py:1811 ms1.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:641 ms1.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:501 ms1.3%
StaticFile.get_headerswhitenoise/responders.py:1711 ms1.3%
Headers.__contains__<stdlib>/wsgiref/headers.py:871 ms1.3%
Headers.get<stdlib>/wsgiref/headers.py:1041 ms1.3%
StaticFile.__init__whitenoise/responders.py:721 ms1.3%
WhiteNoise.get_static_filewhitenoise/base.py:2127 ms7.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2336 ms6.4%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms5.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1974 ms3.8%
URLMixin.urldebug_toolbar/panels/staticfiles.py:204 ms3.8%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2354 ms3.8%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms2.6%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2071 ms1.3%
urljoin<stdlib>/urllib/parse.py:7131 ms1.3%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2141 ms1.3%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:6111 ms1.3%
urlunsplit<stdlib>/urllib/parse.py:6651 ms1.3%
_coerce_args<stdlib>/urllib/parse.py:1391 ms1.3%
MediaTypes.get_typewhitenoise/media_types.py:201 ms1.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2341 ms1.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:621 ms1.3%
Headers.__delitem__<stdlib>/wsgiref/headers.py:711 ms1.3%
WhiteNoise.get_static_filewhitenoise/base.py:2145 ms5.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:625 ms5.1%
Headers.__delitem__<stdlib>/wsgiref/headers.py:714 ms3.8%
Headers.__delitem__<stdlib>/wsgiref/headers.py:721 ms1.3%
WhiteNoise.get_static_filewhitenoise/base.py:2114 ms3.8%
WhiteNoise.add_mime_headerswhitenoise/base.py:2304 ms3.8%
Headers.add_header<stdlib>/wsgiref/headers.py:1851 ms1.3%
WhiteNoise.get_static_filewhitenoise/base.py:2192 ms2.6%
Headers.items<stdlib>/wsgiref/headers.py:1392 ms2.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1231 ms1.3%
WhiteNoise.is_compressed_variantwhitenoise/base.py:2031 ms1.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms5.1%
scantreewhitenoise/base.py:2715 ms5.1%
scantreewhitenoise/base.py:2714 ms3.8%
scantreewhitenoise/base.py:2712 ms2.6%
scantreewhitenoise/base.py:2712 ms2.6%
scantreewhitenoise/base.py:2712 ms2.6%
scantreewhitenoise/base.py:2691 ms1.3%
scantreewhitenoise/base.py:2731 ms1.3%
<GC>~1 ms1.3%
scantreewhitenoise/base.py:2731 ms1.3%
scantreewhitenoise/base.py:2691 ms1.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()27 ms29.5%
TestCase._fixture_teardowndjango/test/testcases.py:150027 ms29.5%
TestCase._rollback_atomicsdjango/test/testcases.py:140827 ms29.5%
Atomic.__exit__django/db/transaction.py:29827 ms29.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2627 ms29.5%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:43127 ms29.5%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:37527 ms29.5%
CursorWrapper.executedjango/db/backends/utils.py:7927 ms29.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9227 ms29.5%
CursorWrapper._executedjango/db/backends/utils.py:10327 ms29.5%
Cursor.executepsycopg/cursor.py:11327 ms29.5%
Connection.waitpsycopg/connection.py:49527 ms29.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:20627 ms29.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28627 ms29.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7827 ms29.5%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()19 ms20.5%
TestCase._fixture_setupdjango/test/testcases.py:148119 ms20.5%
TestCase._enter_atomicsdjango/test/testcases.py:139919 ms20.5%
Atomic.__enter__django/db/transaction.py:22319 ms20.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2619 ms20.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:40019 ms20.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:36718 ms19.2%
CursorWrapper.executedjango/db/backends/utils.py:7918 ms19.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9218 ms19.2%
CursorWrapper._executedjango/db/backends/utils.py:10318 ms19.2%
Cursor.executepsycopg/cursor.py:11318 ms19.2%
Connection.waitpsycopg/connection.py:49518 ms19.2%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3661 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.3%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3201 ms1.3%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2981 ms1.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.3%
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentialsmastodon_auth/tests.py:140 instance = Instance.objects.create(2 ms2.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.6%
QuerySet.createdjango/db/models/query.py:7362 ms2.6%
Model.savedjango/db/models/base.py:9042 ms2.6%
Model.save_basedjango/db/models/base.py:9962 ms2.6%
Model._save_tabledjango/db/models/base.py:11882 ms2.6%
DateTimeField.pre_savedjango/db/models/fields/__init__.py:16931 ms1.3%
Model._do_insertdjango/db/models/base.py:12511 ms1.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.3%
QuerySet._insertdjango/db/models/query.py:21411 ms1.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms1.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.3%
Cursor.executepsycopg/cursor.py:1131 ms1.3%
Connection.waitpsycopg/connection.py:4951 ms1.3%
Estimated from 78 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
mastodon_auth/tests.py:148
response = self.client.post("/mastodon_login/", {"instance": "det.social"})
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentials
· Mocking
|
40 ms |
|
mastodon_auth/tests.py:140
instance = Instance.objects.create(
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentials
· Database
|
2 ms |
Fixtures
Exact setup time| _django_set_urlconf function | 0.22 ms |
| _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.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
8 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call test body
mastodon_auth/tests.py:148
|
42 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
27 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
19 ms |
| call pytest internals | 2 ms |
| setup pytest internals | 1 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 | 92 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 75 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 85 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 58 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 84 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 79 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 51 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 84 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 67 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 59 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 116 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 171 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 192 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 79 ms | Run |