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

AnalyticsTest::test_overview

First seen 9 hours ago in 78a4357
CI github-actions:test 5 runs
Average
20 ms
median 22 ms
max 22 ms
Phases
Setup 0.73 ms Call 20 ms Teardown 0.16 ms
Categories
Database 20 ms Other (Unsampled, Libraries) 0.90 ms

17 database queries per run

Needs 9 KB of memory (max 12 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 hours ago · open run
Hide pytest frames
call21 ms96.0%
CallInfo.from_call_pytest/runner.py:35321 ms96.0%
call_and_report.<locals>.<lambda>_pytest/runner.py:24521 ms96.0%
HookCaller.__call__pluggy/_hooks.py:51221 ms96.0%
PluginManager._hookexecpluggy/_manager.py:12021 ms96.0%
_multicallpluggy/_callers.py:12121 ms96.0%
pytest_runtest_call_pytest/runner.py:17921 ms96.0%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:57321 ms96.0%
SimpleTestCase.__call__django/test/testcases.py:31321 ms96.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36818 ms80.0%
TestCase.__call__<stdlib>/unittest/case.py:74718 ms80.0%
TestCase.run<stdlib>/unittest/case.py:69118 ms80.0%
TestCase._callTestMethod<stdlib>/unittest/case.py:63718 ms80.0%
AnalyticsTest.test_overviewapps/projects/tests.py:757 overview = analytics_overview(resolve_scope(self.project))18 ms80.0%
overviewapps/projects/analytics.py:3039 ms40.0%
flaky_reportapps/projects/flakiness.py:2535 ms24.0%
compute_flaky_reportapps/projects/flakiness.py:2685 ms24.0%
failing_test_idsapps/projects/flakiness.py:210 .distinct()2 ms8.0%
QuerySet.distinctdjango/db/models/query.py:17842 ms8.0%
QuerySet._chaindjango/db/models/query.py:19732 ms8.0%
failing_test_idsapps/projects/flakiness.py:202 ids = set(2 ms8.0%
QuerySet.__iter__django/db/models/query.py:3902 ms8.0%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms8.0%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms8.0%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms8.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms8.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms8.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
failing_test_idsapps/projects/flakiness.py:212 ids |= set(2 ms8.0%
QuerySet.__iter__django/db/models/query.py:3902 ms8.0%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms8.0%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms8.0%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms8.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms8.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms8.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
flaky_reportapps/projects/flakiness.py:2504 ms16.0%
data_versionapps/projects/flakiness.py:228 ingest = Ingest.objects.filter(project=project).aggregate(latest=Max("id"))["latest"]4 ms16.0%
QuerySet.aggregatedjango/db/models/query.py:5944 ms16.0%
Query.get_aggregationdjango/db/models/sql/query.py:6334 ms16.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16114 ms16.0%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7674 ms16.0%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:864 ms16.0%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:754 ms16.0%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3174 ms16.0%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms8.0%
Aggregate.as_sqldjango/db/models/aggregates.py:2092 ms8.0%
overviewapps/projects/analytics.py:3015 ms24.0%
latest_profilesapps/projects/analytics.py:264 profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()5 ms24.0%
QuerySet.firstdjango/db/models/query.py:11455 ms24.0%
QuerySet.__iter__django/db/models/query.py:3905 ms24.0%
QuerySet._fetch_alldjango/db/models/query.py:20005 ms24.0%
ModelIterable.__iter__django/db/models/query.py:954 ms16.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16114 ms16.0%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms8.0%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms8.0%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms8.0%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3002 ms8.0%
SQLCompiler.get_related_selectionsdjango/db/models/sql/compiler.py:12592 ms8.0%
SQLCompiler.get_default_columnsdjango/db/models/sql/compiler.py:10302 ms8.0%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7922 ms8.0%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11592 ms8.0%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms8.0%
Join.as_sqldjango/db/models/sql/datastructures.py:882 ms8.0%
ModelIterable.__iter__django/db/models/query.py:1072 ms8.0%
overviewapps/projects/analytics.py:294 previous = Profile.objects.filter(2 ms8.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms8.0%
QuerySet.filterdjango/db/models/query.py:15422 ms8.0%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms8.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms8.0%
Query.add_qdjango/db/models/sql/query.py:16712 ms8.0%
Query._add_qdjango/db/models/sql/query.py:17032 ms8.0%
overviewapps/projects/analytics.py:3022 ms8.0%
result_countsapps/projects/analytics.py:274 sessions = Session.objects.filter(scope.environment_q(), project=scope.project, date_created__gte=since).aggregate(2 ms8.0%
QuerySet.aggregatedjango/db/models/query.py:5942 ms8.0%
Query.get_aggregationdjango/db/models/sql/query.py:6332 ms8.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms8.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms8.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3714 ms16.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms16.0%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms8.0%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms8.0%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms8.0%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms8.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms8.0%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
Estimated from 12 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

apps/projects/analytics.py:264
profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()
latest_profiles · Database
5 ms
apps/projects/flakiness.py:228
ingest = Ingest.objects.filter(project=project).aggregate(latest=Max("id"))["latest"]
data_version · Database
4 ms
apps/projects/analytics.py:294
previous = Profile.objects.filter(
overview · Database
2 ms
apps/projects/analytics.py:274
sessions = Session.objects.filter(scope.environment_q(), project=scope.project, date_created__gte=since).aggregate(
result_counts · Database
2 ms
apps/projects/flakiness.py:210
.distinct()
failing_test_ids · Database
2 ms
apps/projects/flakiness.py:202
ids = set(
failing_test_ids · Database
2 ms
apps/projects/flakiness.py:212
ids |= set(
failing_test_ids · Database
2 ms

Fixtures

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

Database

17 queries · 8 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:757
18 ms
call _post_teardown
django/test/testcases.py:1240
4 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
2 hours ago CI github-actions:test passed 22 ms 9caa567 main Profile
2 hours ago CI github-actions:test passed 21 ms ec75501 main Profile
9 hours ago CI github-actions:test passed 22 ms d2c12e5 main Profile
9 hours ago CI github-actions:test passed 14 ms 0b902f6 main Profile
9 hours ago CI github-actions:test passed 22 ms 78a4357 main Profile