Tests / apps/projects/tests.py
FlakyReportTest::test_report_by_environment_kind
First seen 8 hours ago in 78a4357
CI
github-actions:test
5 runs
Average
14 ms
median 15 ms
max 16 ms
max 16 ms
Phases
Setup 0.72 ms
Call 13 ms
Teardown 0.16 ms
Categories
Database 12 ms
App code 0.40 ms
Other (Unsampled, Deep copies, pytest) 1 ms
14 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, an hour ago ·
open run
call14 ms93.0%
CallInfo.from_call_pytest/runner.py:35314 ms93.0%
call_and_report.<locals>.<lambda>_pytest/runner.py:24514 ms93.0%
HookCaller.__call__pluggy/_hooks.py:51214 ms93.0%
PluginManager._hookexecpluggy/_manager.py:12014 ms93.0%
_multicallpluggy/_callers.py:12114 ms93.0%
pytest_runtest_call_pytest/runner.py:17914 ms93.0%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:57314 ms93.0%
SimpleTestCase.__call__django/test/testcases.py:31314 ms93.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36811 ms74.4%
TestCase.__call__<stdlib>/unittest/case.py:74711 ms74.4%
TestCase.run<stdlib>/unittest/case.py:69111 ms74.4%
TestCase._callTestMethod<stdlib>/unittest/case.py:63711 ms74.4%
FlakyReportTest.test_report_by_environment_kindapps/projects/tests.py:634 report = flaky_report(self.project, days=30, environment_kind="local")11 ms74.4%
flaky_reportapps/projects/flakiness.py:25310 ms65.1%
compute_flaky_reportapps/projects/flakiness.py:2724 ms27.9%
observations_forapps/projects/flakiness.py:165 test_runs = list(test_runs)1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
ValuesListIterable.__iter__django/db/models/query.py:2381 ms9.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms9.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms9.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms9.3%
observations_forapps/projects/flakiness.py:169 for row in Session.objects.filter(id__in={row[4] for row in test_runs}).values_list(1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
ValuesListIterable.__iter__django/db/models/query.py:2381 ms9.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
observations_forapps/projects/flakiness.py:179 perfs = TestPerf.objects.filter(1 ms9.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms9.3%
QuerySet.filterdjango/db/models/query.py:15421 ms9.3%
QuerySet._filter_or_excludedjango/db/models/query.py:15601 ms9.3%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15701 ms9.3%
Query.add_qdjango/db/models/sql/query.py:16711 ms9.3%
Query._add_qdjango/db/models/sql/query.py:17031 ms9.3%
Query.build_filterdjango/db/models/sql/query.py:15771 ms9.3%
Query.setup_joinsdjango/db/models/sql/query.py:19871 ms9.3%
Query.joindjango/db/models/sql/query.py:11451 ms9.3%
compute_flaky_reportapps/projects/flakiness.py:2683 ms18.6%
failing_test_idsapps/projects/flakiness.py:202 ids = set(1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
FlatValuesListIterable.__iter__django/db/models/query.py:2771 ms9.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
failing_test_idsapps/projects/flakiness.py:212 ids |= set(1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
FlatValuesListIterable.__iter__django/db/models/query.py:2771 ms9.3%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
compute_flaky_reportapps/projects/flakiness.py:267 environments = list(Environment.objects.filter(project=project, kind=environment_kind))1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
ModelIterable.__iter__django/db/models/query.py:951 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
compute_flaky_reportapps/projects/flakiness.py:271 tests = {test.id: test for test in Test.objects.filter(id__in=ids)}1 ms9.3%
QuerySet.__iter__django/db/models/query.py:3901 ms9.3%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms9.3%
ModelIterable.__iter__django/db/models/query.py:951 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
flaky_reportapps/projects/flakiness.py:2501 ms9.3%
data_versionapps/projects/flakiness.py:229 profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]1 ms9.3%
QuerySet.aggregatedjango/db/models/query.py:5941 ms9.3%
Query.get_aggregationdjango/db/models/sql/query.py:6331 ms9.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms9.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms9.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms9.3%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms9.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms9.3%
Cursor.executepsycopg/cursor.py:1131 ms9.3%
Connection.waitpsycopg/connection.py:4951 ms9.3%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3713 ms18.6%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms18.6%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms18.6%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms18.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms18.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms18.6%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1003 ms18.6%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms18.6%
Cursor.executepsycopg/cursor.py:1133 ms18.6%
Connection.waitpsycopg/connection.py:4953 ms18.6%
Estimated from 10 samples; phase durations are exact. Frames from pytest and pluggy are
shown
.
Hot lines in your code
|
apps/projects/flakiness.py:229
profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]
data_version
· Database
|
1 ms |
|
apps/projects/flakiness.py:267
environments = list(Environment.objects.filter(project=project, kind=environment_kind))
compute_flaky_report
· Database
|
1 ms |
|
apps/projects/flakiness.py:202
ids = set(
failing_test_ids
· Database
|
1 ms |
|
apps/projects/flakiness.py:212
ids |= set(
failing_test_ids
· Database
|
1 ms |
|
apps/projects/flakiness.py:271
tests = {test.id: test for test in Test.objects.filter(id__in=ids)}
compute_flaky_report
· Database
|
1 ms |
|
apps/projects/flakiness.py:165
test_runs = list(test_runs)
observations_for
· Database
|
1 ms |
|
apps/projects/flakiness.py:169
for row in Session.objects.filter(id__in={row[4] for row in test_runs}).values_list(
observations_for
· Database
|
1 ms |
|
apps/projects/flakiness.py:179
perfs = TestPerf.objects.filter(
observations_for
· Database
|
1 ms |
Fixtures
Exact setup time| _django_set_urlconf function | 0.23 ms |
| _live_server_helper function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _dj_autoclear_mailbox function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
14 queries · 7 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/projects/tests.py:634
|
11 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
3 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| an hour ago | CI github-actions:test | passed | 15 ms | Profile |
| an hour ago | CI github-actions:test | passed | 15 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 16 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 10 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 15 ms | Profile |