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

AnalyticsTest::test_overview

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
19 ms
median 22 ms
max 23 ms
Phases
Setup 0.66 ms Call 19 ms Teardown 0.15 ms
Categories
Database 18 ms App code 0.07 ms Other (Unsampled, pytest, Libraries, Deep copies) 1 ms

17 database queries per run

Needs 5 KB of memory (max 16 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
call18 ms96.1%
AnalyticsTest.test_overviewapps/projects/tests.py:758 overview = analytics_overview(resolve_scope(self.project))17 ms88.1%
overviewapps/projects/analytics.py:3038 ms40.0%
flaky_reportapps/projects/flakiness.py:2535 ms24.0%
compute_flaky_reportapps/projects/flakiness.py:2683 ms16.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%
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%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms8.0%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms8.0%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms8.0%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms8.0%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms8.0%
compute_flaky_reportapps/projects/flakiness.py:2722 ms8.0%
observations_forapps/projects/flakiness.py:163 .values_list("test_id", "date_run", "status", "failed", "session_id")2 ms8.0%
QuerySet.values_listdjango/db/models/query.py:14582 ms8.0%
QuerySet._valuesdjango/db/models/query.py:14092 ms8.0%
Query.set_valuesdjango/db/models/sql/query.py:25482 ms8.0%
Query.check_aliasdjango/db/models/sql/query.py:12292 ms8.0%
flaky_reportapps/projects/flakiness.py:2503 ms16.0%
data_versionapps/projects/flakiness.py:228 ingest = Ingest.objects.filter(project=project).aggregate(latest=Max("id"))["latest"]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%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
data_versionapps/projects/flakiness.py:229 profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]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%
overviewapps/projects/analytics.py:3013 ms16.0%
latest_profilesapps/projects/analytics.py:264 profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()3 ms16.0%
QuerySet.firstdjango/db/models/query.py:11453 ms16.0%
QuerySet.__iter__django/db/models/query.py:3903 ms16.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms16.0%
ModelIterable.__iter__django/db/models/query.py:953 ms16.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%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms8.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:3172 ms8.0%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms8.0%
Col.as_sqldjango/db/models/expressions.py:13252 ms8.0%
SQLCompiler.quote_name_unless_aliasdjango/db/backends/postgresql/compiler.py:342 ms8.0%
SQLCompiler.quote_name_unless_aliasdjango/db/models/sql/compiler.py:5582 ms8.0%
overviewapps/projects/analytics.py:291 stats = profiles.aggregate(2 ms8.0%
QuerySet.aggregatedjango/db/models/query.py:5942 ms8.0%
Query.get_aggregationdjango/db/models/sql/query.py:4842 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%
Query.build_filterdjango/db/models/sql/query.py:16132 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%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms8.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms8.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms8.0%
overviewapps/projects/analytics.py:324 "environments": len({p.environment_id for p in profiles.only("environment_id")}),2 ms8.0%
QuerySet.__iter__django/db/models/query.py:3902 ms8.0%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms8.0%
ModelIterable.__iter__django/db/models/query.py:952 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%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.0%
Cursor.executepsycopg/cursor.py:1132 ms8.0%
Connection.waitpsycopg/connection.py:4952 ms8.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 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%
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 hidden .

Hot lines in your code

apps/projects/analytics.py:264
profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()
latest_profiles · Database
3 ms
apps/projects/analytics.py:291
stats = profiles.aggregate(
overview · Database
2 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:228
ingest = Ingest.objects.filter(project=project).aggregate(latest=Max("id"))["latest"]
data_version · Database
2 ms
apps/projects/flakiness.py:229
profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]
data_version · 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
apps/projects/flakiness.py:163
.values_list("test_id", "date_run", "status", "failed", "session_id")
observations_for · Database
2 ms
apps/projects/analytics.py:324
"environments": len({p.environment_id for p in profiles.only("environment_id")}),
overview · Database
2 ms

Fixtures

Exact setup time
_django_db_marker function 0.04 ms
_dj_autoclear_mailbox function 0.04 ms
_django_set_urlconf function 0.03 ms
_template_string_if_invalid_marker 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

17 queries · 7 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:758
17 ms
call _post_teardown
django/test/testcases.py:1240
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 19 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 13 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 23 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 18 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 23 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 13 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 23 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 22 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 21 ms ec75501 main Profile
3 weeks ago CI github-actions:test passed 22 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 14 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 22 ms 78a4357 main Profile