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

AnalyticsTest::test_slow_tests

First seen 10 hours ago in 78a4357
CI github-actions:test 5 runs
Average
10 ms
median 11 ms
max 11 ms
Phases
Setup 0.68 ms Call 9 ms Teardown 0.16 ms
Categories
Database 5 ms App code 0.40 ms Other (Unsampled) 5 ms

10 database queries per run

Needs 2 KB of memory (max 4 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 3 hours ago · open run
Hide pytest frames
call10 ms91.7%
CallInfo.from_call_pytest/runner.py:35310 ms91.7%
call_and_report.<locals>.<lambda>_pytest/runner.py:24510 ms91.7%
HookCaller.__call__pluggy/_hooks.py:51210 ms91.7%
PluginManager._hookexecpluggy/_manager.py:12010 ms91.7%
_multicallpluggy/_callers.py:12110 ms91.7%
pytest_runtest_call_pytest/runner.py:17910 ms91.7%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:57310 ms91.7%
SimpleTestCase.__call__django/test/testcases.py:31310 ms91.7%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3688 ms73.4%
TestCase.__call__<stdlib>/unittest/case.py:7478 ms73.4%
TestCase.run<stdlib>/unittest/case.py:6918 ms73.4%
TestCase._callTestMethod<stdlib>/unittest/case.py:6378 ms73.4%
AnalyticsTest.test_slow_testsapps/projects/tests.py:735 rows = slow_tests(resolve_scope(self.project))8 ms73.4%
slow_testsapps/projects/analytics.py:4432 ms18.3%
daily_totalsapps/projects/analytics.py:406 return rows.values("test_id", "test__name", "test__slug").annotate(2 ms18.3%
QuerySet.valuesdjango/db/models/query.py:14142 ms18.3%
slow_testsapps/projects/analytics.py:442 rows = list(2 ms18.3%
QuerySet.__iter__django/db/models/query.py:3902 ms18.3%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms18.3%
ValuesIterable.__iter__django/db/models/query.py:2222 ms18.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms18.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms18.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms18.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms18.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms18.3%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms18.3%
Cursor.executepsycopg/cursor.py:1132 ms18.3%
Connection.waitpsycopg/connection.py:4952 ms18.3%
slow_testsapps/projects/analytics.py:4502 ms18.3%
categories_by_testapps/projects/analytics.py:424 for test_id, run_count, categories in rows.filter(test_id__in=test_ids).values_list(2 ms18.3%
QuerySet.__iter__django/db/models/query.py:3902 ms18.3%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms18.3%
ValuesListIterable.__iter__django/db/models/query.py:2382 ms18.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms18.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms18.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms18.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms18.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms18.3%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms18.3%
Cursor.executepsycopg/cursor.py:1132 ms18.3%
Connection.waitpsycopg/connection.py:4952 ms18.3%
slow_testsapps/projects/analytics.py:453 TestSnapshot.objects.filter(scope.environment_q(), test_id__in=ids)2 ms18.3%
QuerySet.__iter__django/db/models/query.py:3902 ms18.3%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms18.3%
ModelIterable.__iter__django/db/models/query.py:952 ms18.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms18.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms18.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms18.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms18.3%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms18.3%
Cursor.executepsycopg/cursor.py:1132 ms18.3%
Connection.waitpsycopg/connection.py:4952 ms18.3%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3712 ms18.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms18.3%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms18.3%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms18.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms18.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms18.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms18.3%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms18.3%
Cursor.executepsycopg/cursor.py:1132 ms18.3%
Connection.waitpsycopg/connection.py:4952 ms18.3%
Estimated from 5 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

apps/projects/analytics.py:406
return rows.values("test_id", "test__name", "test__slug").annotate(
daily_totals · Database
2 ms
apps/projects/analytics.py:442
rows = list(
slow_tests · Database
2 ms
apps/projects/analytics.py:424
for test_id, run_count, categories in rows.filter(test_id__in=test_ids).values_list(
categories_by_test · Database
2 ms
apps/projects/analytics.py:453
TestSnapshot.objects.filter(scope.environment_q(), test_id__in=ids)
slow_tests · Database
2 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.05 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_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.03 ms

Database

10 queries · 5 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:735
8 ms
call _post_teardown
django/test/testcases.py:1240
2 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
3 hours ago CI github-actions:test passed 11 ms 9caa567 main Profile
3 hours ago CI github-actions:test passed 11 ms ec75501 main Profile
10 hours ago CI github-actions:test passed 11 ms d2c12e5 main Profile
10 hours ago CI github-actions:test passed 6 ms 0b902f6 main Profile
10 hours ago CI github-actions:test passed 10 ms 78a4357 main Profile