Tests / starter_packs/tests.py
TestOwnerManagement::test_owner_cancels_invitation
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
145 ms
median 125 ms
max 261 ms
max 261 ms
Phases
Setup 1 ms
Call 144 ms
Teardown 0.37 ms
Categories
Database 41 ms
Test code 2 ms
App code 0.15 ms
Other (Libraries, pytest, Templates, Deep copies, ...) 102 ms
28 database queries per run
Needs 278 KB of memory (max 1 MB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call64 ms98.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()38 ms57.9%
TestCase._fixture_teardowndjango/test/testcases.py:149830 ms45.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49529 ms44.3%
CursorWrapper.executedjango/db/backends/utils.py:7929 ms44.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9229 ms44.3%
CursorWrapper._executedjango/db/backends/utils.py:10329 ms44.3%
Cursor.executepsycopg/cursor.py:11329 ms44.3%
Connection.waitpsycopg/connection.py:49529 ms44.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:20627 ms41.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28627 ms41.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7827 ms41.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4960.80 ms1.2%
CursorWrapper.executedjango/db/backends/utils.py:790.80 ms1.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.80 ms1.2%
CursorWrapper._executedjango/db/backends/utils.py:1030.80 ms1.2%
Cursor.executepsycopg/cursor.py:1130.80 ms1.2%
Connection.waitpsycopg/connection.py:4950.80 ms1.2%
TestCase._fixture_teardowndjango/test/testcases.py:15006 ms9.8%
TestCase._rollback_atomicsdjango/test/testcases.py:14086 ms9.8%
Atomic.__exit__django/db/transaction.py:2954 ms6.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:264 ms6.2%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4134 ms6.2%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3714 ms6.2%
CursorWrapper.executedjango/db/backends/utils.py:794 ms6.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms6.2%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms6.2%
Cursor.executepsycopg/cursor.py:1134 ms6.2%
Connection.waitpsycopg/connection.py:4954 ms6.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms6.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms6.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms6.2%
Atomic.__exit__django/db/transaction.py:2982 ms3.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms3.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms3.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms3.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms3.7%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms2.5%
TestCase._should_check_constraintsdjango/test/testcases.py:15062 ms2.5%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5030.80 ms1.2%
Connection.cursorpsycopg/connection.py:2590.80 ms1.2%
Cursor.__init__psycopg/cursor.py:470.80 ms1.2%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5040.80 ms1.2%
Cursor.executepsycopg/cursor.py:1130.80 ms1.2%
Connection.waitpsycopg/connection.py:4950.80 ms1.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.80 ms1.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.80 ms1.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.80 ms1.2%
TestOwnerManagement.test_owner_cancels_invitationstarter_packs/tests.py:553 self.assertFalse(self.pack.invitations.filter(invited_user=self.friend).exists())21 ms32.0%
QuerySet.existsdjango/db/models/query.py:145818 ms28.3%
Query.has_resultsdjango/db/models/sql/query.py:68718 ms27.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:159318 ms27.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162517 ms25.8%
CursorWrapper.executedjango/db/backends/utils.py:7917 ms25.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9217 ms25.8%
CursorWrapper._executedjango/db/backends/utils.py:10517 ms25.8%
Cursor.executepsycopg/cursor.py:11317 ms25.8%
Connection.waitpsycopg/connection.py:49517 ms25.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:20617 ms25.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28617 ms25.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7817 ms25.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16120.80 ms1.2%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7960.80 ms1.2%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.80 ms1.2%
WhereNode.as_sqldjango/db/models/sql/where.py:1510.80 ms1.2%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.80 ms1.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.5%
create_reverse_many_to_one_manager.<locals>.RelatedManager.get_querysetdjango/db/models/fields/related_descriptors.py:8090.80 ms1.2%
BaseManager.get_querysetdjango/db/models/manager.py:1550.80 ms1.2%
QuerySet.filterdjango/db/models/query.py:16760.80 ms1.2%
QuerySet._filter_or_excludedjango/db/models/query.py:16940.80 ms1.2%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17040.80 ms1.2%
Query.add_qdjango/db/models/sql/query.py:16810.80 ms1.2%
Query._add_qdjango/db/models/sql/query.py:17130.80 ms1.2%
Query.build_filterdjango/db/models/sql/query.py:15770.80 ms1.2%
TestOwnerManagement.test_owner_cancels_invitationstarter_packs/tests.py:551 response = self.client.post(reverse("cancel_invitation", args=[self.pack.slug, self.friend.id]))3 ms4.9%
Client.postdjango/test/client.py:11623 ms4.9%
RequestFactory.postdjango/test/client.py:4993 ms4.9%
RequestFactory.genericdjango/test/client.py:6713 ms4.9%
Client.requestdjango/test/client.py:10913 ms4.9%
ClientHandler.__call__django/test/client.py:1863 ms4.9%
BaseHandler.get_responsedjango/core/handlers/base.py:1423 ms4.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms4.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms4.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms4.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms3.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms3.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1452 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms3.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms3.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1992 ms2.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:632 ms2.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:622 ms2.5%
cancel_invitationstarter_packs/views.py:499 return render(request, "owners_updated.html", owners_manager_context(starter_pack, q))2 ms2.5%
renderdjango/shortcuts.py:272 ms2.5%
render_to_stringdjango/template/loader.py:610.80 ms1.2%
render_to_stringdjango/template/loader.py:620.80 ms1.2%
Template.renderdjango/template/backends/django.py:1070.80 ms1.2%
Template.renderdjango/template/base.py:1750.80 ms1.2%
instrumented_test_renderdjango/test/utils.py:1130.80 ms1.2%
NodeList.renderdjango/template/base.py:11080.80 ms1.2%
Node.render_annotateddjango/template/base.py:10690.80 ms1.2%
IncludeNode.renderdjango/template/loader_tags.py:2110.80 ms1.2%
Template.renderdjango/template/base.py:1770.80 ms1.2%
instrumented_test_renderdjango/test/utils.py:1130.80 ms1.2%
NodeList.renderdjango/template/base.py:11080.80 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.80 ms1.2%
LocaleMiddleware.process_responsedjango/middleware/locale.py:400.80 ms1.2%
get_language_from_pathdjango/utils/translation/__init__.py:2520.80 ms1.2%
get_language_from_pathdjango/utils/translation/trans_real.py:5590.80 ms1.2%
get_supported_language_variantdjango/utils/translation/trans_real.py:5420.80 ms1.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.80 ms1.2%
CSPMiddleware.process_responsecsp/middleware.py:830.80 ms1.2%
build_policycsp/utils.py:940.80 ms1.2%
TestOwnerManagement.test_owner_cancels_invitationstarter_packs/tests.py:550 self.client.force_login(self.owner)0.80 ms1.2%
ClientMixin.force_logindjango/test/client.py:8580.80 ms1.2%
ClientMixin._logindjango/test/client.py:8890.80 ms1.2%
logindjango/contrib/auth/__init__.py:1890.80 ms1.2%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4370.80 ms1.2%
SessionStore.createdjango/contrib/sessions/backends/db.py:700.80 ms1.2%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2000.80 ms1.2%
get_random_stringdjango/utils/crypto.py:780.80 ms1.2%
get_random_string.<locals>.<genexpr>django/utils/crypto.py:780.80 ms1.2%
Random.choice<stdlib>/random.py:3540.80 ms1.2%
Random._randbelow_with_getrandbits<stdlib>/random.py:2510.80 ms1.2%
Estimated from 80 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
starter_packs/tests.py:553
self.assertFalse(self.pack.invitations.filter(invited_user=self.friend).exists())
TestOwnerManagement.test_owner_cancels_invitation
· Database
|
21 ms |
|
starter_packs/views.py:499
return render(request, "owners_updated.html", owners_manager_context(starter_pack, q))
cancel_invitation
· Templates
|
2 ms |
|
starter_packs/tests.py:551
response = self.client.post(reverse("cancel_invitation", args=[self.pack.slug, self.friend.id]))
TestOwnerManagement.test_owner_cancels_invitation
· Libraries
|
2 ms |
|
starter_packs/tests.py:550
self.client.force_login(self.owner)
TestOwnerManagement.test_owner_cancels_invitation
· Libraries
|
0.80 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
28 queries · 10 msNo repeated queries.
Biggest pieces of work
|
call _post_teardown
django/test/testcases.py:1243
|
38 ms |
|
call test body
starter_packs/tests.py:553
|
25 ms |
| call pytest internals | 2 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 | 65 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 137 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 125 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 69 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 261 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 206 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 84 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 122 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 109 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 68 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 223 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 215 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 208 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 83 ms | Run |