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

MemoryTest::test_memory_tests_are_ranked_by_average_peak

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
13 ms
median 15 ms
max 17 ms
Phases
Setup 0.68 ms Call 13 ms Teardown 0.15 ms
Categories
Database 12 ms Other (Unsampled, Imports, pytest, Libraries) 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, 16 hours ago · open run
Show pytest frames
call13 ms93.9%
MemoryTest.setUpapps/projects/tests.py:1413 self.client.force_login(self.user)4 ms26.8%
ClientMixin.force_logindjango/test/client.py:8554 ms26.8%
ClientMixin._logindjango/test/client.py:8814 ms26.8%
logindjango/contrib/auth/__init__.py:1732 ms13.4%
AbstractBaseUser.get_session_auth_hashdjango/contrib/auth/base_user.py:1362 ms13.4%
AbstractBaseUser._get_session_auth_hashdjango/contrib/auth/base_user.py:1442 ms13.4%
salted_hmacdjango/utils/crypto.py:452 ms13.4%
logindjango/contrib/auth/__init__.py:1872 ms13.4%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms13.4%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms13.4%
Model.deletedjango/db/models/base.py:12982 ms13.4%
Collector.deletedjango/db/models/deletion.py:4522 ms13.4%
DeleteQuery.delete_batchdjango/db/models/sql/subqueries.py:432 ms13.4%
DeleteQuery.do_querydjango/db/models/sql/subqueries.py:252 ms13.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms13.4%
CursorWrapper.executedjango/db/backends/utils.py:792 ms13.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms13.4%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms13.4%
Cursor.executepsycopg/cursor.py:1132 ms13.4%
MemoryTest.test_memory_tests_are_ranked_by_average_peakapps/projects/tests.py:1433 rows = memory_tests(resolve_scope(self.project, "", 30))4 ms26.8%
memory_testsapps/projects/analytics.py:518 scope.perf()4 ms26.8%
Scope.perfapps/projects/analytics.py:167 return TestPerf.objects.filter(self.environment_q(), project=self.project, date__gte=self.since)2 ms13.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms13.4%
QuerySet.filterdjango/db/models/query.py:15422 ms13.4%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms13.4%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms13.4%
Query.add_qdjango/db/models/sql/query.py:16712 ms13.4%
Query._add_qdjango/db/models/sql/query.py:17032 ms13.4%
QuerySet.__iter__django/db/models/query.py:3902 ms13.4%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms13.4%
ModelIterable.__iter__django/db/models/query.py:952 ms13.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms13.4%
CursorWrapper.executedjango/db/backends/utils.py:792 ms13.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms13.4%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms13.4%
Cursor.executepsycopg/cursor.py:1132 ms13.4%
Connection.waitpsycopg/connection.py:4952 ms13.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms26.8%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms13.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms13.4%
CursorWrapper.executedjango/db/backends/utils.py:792 ms13.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms13.4%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms13.4%
Cursor.executepsycopg/cursor.py:1132 ms13.4%
Connection.waitpsycopg/connection.py:4952 ms13.4%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms13.4%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms13.4%
Atomic.__exit__django/db/transaction.py:2832 ms13.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms13.4%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms13.4%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms13.4%
CursorWrapper.executedjango/db/backends/utils.py:792 ms13.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms13.4%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms13.4%
Cursor.executepsycopg/cursor.py:1132 ms13.4%
Connection.waitpsycopg/connection.py:4952 ms13.4%
Estimated from 7 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:1413
self.client.force_login(self.user)
MemoryTest.setUp · Libraries
4 ms
apps/projects/analytics.py:167
return TestPerf.objects.filter(self.environment_q(), project=self.project, date__gte=self.since)
Scope.perf · Database
2 ms
apps/projects/analytics.py:518
scope.perf()
memory_tests · Database
2 ms

Fixtures

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

Database

22 queries · 6 ms
No repeated queries.

Biggest pieces of work

call setUp
apps/projects/tests.py:1413
4 ms
call test body
apps/projects/tests.py:1433
4 ms
call _post_teardown
django/test/testcases.py:1240
4 ms
call pytest internals 2 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 13 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 8 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 15 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 12 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 16 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 10 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 16 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 15 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 15 ms ec75501 main Profile
3 weeks ago CI github-actions:test passed 17 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 9 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 15 ms 78a4357 main Profile