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

MemoryTest::test_memory_tests_are_ranked_by_average_peak

First seen 8 hours ago in 78a4357
CI github-actions:test 5 runs
Average
14 ms
median 15 ms
max 17 ms
Phases
Setup 0.72 ms Call 13 ms Teardown 0.17 ms
Categories
Database 13 ms Other (Imports, Unsampled, pytest) 2 ms

22 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 45 minutes ago · open run
Show pytest frames
call14 ms94.4%
MemoryTest.setUpapps/projects/tests.py:1375 self.client.force_login(self.user)8 ms50.8%
ClientMixin.force_logindjango/test/client.py:8558 ms50.8%
ClientMixin._logindjango/test/client.py:8814 ms29.0%
logindjango/contrib/auth/__init__.py:1873 ms21.8%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4342 ms14.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms7.3%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1981 ms7.3%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms7.3%
QuerySet.existsdjango/db/models/query.py:13371 ms7.3%
Query.has_resultsdjango/db/models/sql/query.py:6811 ms7.3%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15921 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2051 ms7.3%
BaseCursor._convert_querypsycopg/_cursor_base.py:4651 ms7.3%
SessionStore.createdjango/contrib/sessions/backends/db.py:741 ms7.3%
SessionStore.savedjango/contrib/sessions/backends/db.py:1271 ms7.3%
Model.savedjango/db/models/base.py:8741 ms7.3%
Model.save_basedjango/db/models/base.py:9661 ms7.3%
Model._save_tabledjango/db/models/base.py:11671 ms7.3%
Model._do_insertdjango/db/models/base.py:12181 ms7.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms7.3%
QuerySet._insertdjango/db/models/query.py:19181 ms7.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19251 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4371 ms7.3%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1751 ms7.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms7.3%
QuerySet.getdjango/db/models/query.py:6351 ms7.3%
QuerySet.__len__django/db/models/query.py:3721 ms7.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms7.3%
ModelIterable.__iter__django/db/models/query.py:951 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
logindjango/contrib/auth/__init__.py:1971 ms7.3%
Signal.senddjango/dispatch/dispatcher.py:2091 ms7.3%
update_last_logindjango/contrib/auth/models.py:241 ms7.3%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:621 ms7.3%
Model.savedjango/db/models/base.py:8741 ms7.3%
Model.save_basedjango/db/models/base.py:9661 ms7.3%
Model._save_tabledjango/db/models/base.py:11101 ms7.3%
Model._do_updatedjango/db/models/base.py:12111 ms7.3%
QuerySet._updatedjango/db/models/query.py:13271 ms7.3%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21401 ms7.3%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21111 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms7.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms7.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms7.3%
ClientMixin._logindjango/test/client.py:8762 ms14.5%
ClientMixin.sessiondjango/test/client.py:8122 ms14.5%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms14.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms7.3%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1981 ms7.3%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms7.3%
QuerySet.existsdjango/db/models/query.py:13371 ms7.3%
Query.has_resultsdjango/db/models/sql/query.py:6811 ms7.3%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15921 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
SessionStore.createdjango/contrib/sessions/backends/db.py:741 ms7.3%
SessionStore.savedjango/contrib/sessions/backends/db.py:1271 ms7.3%
Model.savedjango/db/models/base.py:8741 ms7.3%
Model.save_basedjango/db/models/base.py:9661 ms7.3%
Model._save_tabledjango/db/models/base.py:11671 ms7.3%
Model._do_insertdjango/db/models/base.py:12181 ms7.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms7.3%
QuerySet._insertdjango/db/models/query.py:19181 ms7.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19251 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
ClientMixin._logindjango/test/client.py:8831 ms7.3%
SessionStore.savedjango/contrib/sessions/backends/db.py:1271 ms7.3%
Model.savedjango/db/models/base.py:8741 ms7.3%
Model.save_basedjango/db/models/base.py:9661 ms7.3%
Model._save_tabledjango/db/models/base.py:11101 ms7.3%
Model._do_updatedjango/db/models/base.py:12111 ms7.3%
QuerySet._updatedjango/db/models/query.py:13271 ms7.3%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21401 ms7.3%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21111 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
MemoryTest.test_memory_tests_are_ranked_by_average_peakapps/projects/tests.py:1395 rows = memory_tests(resolve_scope(self.project, "", 30))3 ms21.8%
memory_testsapps/projects/analytics.py:506 .annotate(1 ms7.3%
QuerySet.annotatedjango/db/models/query.py:16991 ms7.3%
QuerySet._annotatedjango/db/models/query.py:17511 ms7.3%
memory_testsapps/projects/analytics.py:504 rows = list(1 ms7.3%
QuerySet.__iter__django/db/models/query.py:3901 ms7.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms7.3%
ValuesIterable.__iter__django/db/models/query.py:2221 ms7.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
memory_testsapps/projects/analytics.py:518 scope.perf()1 ms7.3%
QuerySet.__iter__django/db/models/query.py:3901 ms7.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms7.3%
ModelIterable.__iter__django/db/models/query.py:951 ms7.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16111 ms7.3%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7671 ms7.3%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:861 ms7.3%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:751 ms7.3%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2631 ms7.3%
SQLCompiler.get_select.<locals>.<genexpr>django/db/models/sql/compiler.py:2641 ms7.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms21.8%
TestCase._fixture_teardowndjango/test/testcases.py:14941 ms7.3%
TestCase._should_check_constraintsdjango/test/testcases.py:15031 ms7.3%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4921 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
TestCase._fixture_teardowndjango/test/testcases.py:14951 ms7.3%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4831 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
TestCase._fixture_teardowndjango/test/testcases.py:14971 ms7.3%
TestCase._rollback_atomicsdjango/test/testcases.py:14051 ms7.3%
Atomic.__exit__django/db/transaction.py:2831 ms7.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms7.3%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131 ms7.3%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711 ms7.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms7.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms7.3%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms7.3%
Cursor.executepsycopg/cursor.py:1131 ms7.3%
Connection.waitpsycopg/connection.py:4951 ms7.3%
Estimated from 13 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:1375
self.client.force_login(self.user)
MemoryTest.setUp · Database
8 ms
apps/projects/analytics.py:506
.annotate(
memory_tests · Database
1 ms
apps/projects/analytics.py:504
rows = list(
memory_tests · Database
1 ms
apps/projects/analytics.py:518
scope.perf()
memory_tests · Database
1 ms

Fixtures

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

Database

22 queries · 7 ms
No repeated queries.

Biggest pieces of work

call setUp
apps/projects/tests.py:1375
8 ms
call test body
apps/projects/tests.py:1395
3 ms
call _post_teardown
django/test/testcases.py:1240
3 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
45 minutes ago CI github-actions:test passed 15 ms 9caa567 main Profile
an hour ago CI github-actions:test passed 15 ms ec75501 main Profile
7 hours ago CI github-actions:test passed 17 ms d2c12e5 main Profile
8 hours ago CI github-actions:test passed 9 ms 0b902f6 main Profile
8 hours ago CI github-actions:test passed 15 ms 78a4357 main Profile