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

FlakyReportTest::test_report_by_environment_kind

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
13 ms
median 14 ms
max 16 ms
Phases
Setup 0.65 ms Call 12 ms Teardown 0.14 ms
Categories
Database 11 ms App code 0.17 ms Other (Unsampled, pytest, Deep copies) 2 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, 16 hours ago · open run
Show pytest frames
setup0.69 ms5.2%
call12 ms93.8%
FlakyReportTest.test_report_by_environment_kindapps/projects/tests.py:635 report = flaky_report(self.project, days=30, environment_kind="local")11 ms82.1%
flaky_reportapps/projects/flakiness.py:2538 ms58.6%
compute_flaky_reportapps/projects/flakiness.py:2725 ms35.2%
observations_forapps/projects/flakiness.py:165 test_runs = list(test_runs)3 ms23.4%
QuerySet.__iter__django/db/models/query.py:3903 ms23.4%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms23.4%
ValuesListIterable.__iter__django/db/models/query.py:2383 ms23.4%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15733 ms23.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16113 ms23.4%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7923 ms23.4%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11593 ms23.4%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms23.4%
Join.as_sqldjango/db/models/sql/datastructures.py:932 ms11.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms11.7%
Join.as_sqldjango/db/models/sql/datastructures.py:882 ms11.7%
DatabaseOperations.prepare_join_on_clausedjango/db/backends/postgresql/operations.py:3992 ms11.7%
ForeignKey.db_typedjango/db/models/fields/related.py:12232 ms11.7%
observations_forapps/projects/flakiness.py:186 perfs = list(perfs)2 ms11.7%
QuerySet.__iter__django/db/models/query.py:3902 ms11.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms11.7%
ValuesListIterable.__iter__django/db/models/query.py:2382 ms11.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms11.7%
compute_flaky_reportapps/projects/flakiness.py:267 environments = list(Environment.objects.filter(project=project, kind=environment_kind))2 ms11.7%
QuerySet.__iter__django/db/models/query.py:3902 ms11.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms11.7%
ModelIterable.__iter__django/db/models/query.py:952 ms11.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms11.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms11.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms11.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms11.7%
Cursor.executepsycopg/cursor.py:1132 ms11.7%
Connection.waitpsycopg/connection.py:4952 ms11.7%
compute_flaky_reportapps/projects/flakiness.py:271 tests = {test.id: test for test in Test.objects.filter(id__in=ids)}2 ms11.7%
QuerySet.__iter__django/db/models/query.py:3902 ms11.7%
flaky_reportapps/projects/flakiness.py:2503 ms23.4%
data_versionapps/projects/flakiness.py:228 ingest = Ingest.objects.filter(project=project).aggregate(latest=Max("id"))["latest"]2 ms11.7%
QuerySet.aggregatedjango/db/models/query.py:5942 ms11.7%
Query.get_aggregationdjango/db/models/sql/query.py:6332 ms11.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms11.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms11.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms11.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms11.7%
Cursor.executepsycopg/cursor.py:1132 ms11.7%
Connection.waitpsycopg/connection.py:4952 ms11.7%
data_versionapps/projects/flakiness.py:229 profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]2 ms11.7%
QuerySet.aggregatedjango/db/models/query.py:5942 ms11.7%
Query.get_aggregationdjango/db/models/sql/query.py:6332 ms11.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms11.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms11.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms11.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms11.7%
Cursor.executepsycopg/cursor.py:1132 ms11.7%
Connection.waitpsycopg/connection.py:4952 ms11.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms11.7%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms11.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms11.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms11.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms11.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms11.7%
Cursor.executepsycopg/cursor.py:1132 ms11.7%
Connection.waitpsycopg/connection.py:4952 ms11.7%
Estimated from 9 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/flakiness.py:165
test_runs = list(test_runs)
observations_for · Database
3 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:267
environments = list(Environment.objects.filter(project=project, kind=environment_kind))
compute_flaky_report · Database
2 ms
apps/projects/flakiness.py:271
tests = {test.id: test for test in Test.objects.filter(id__in=ids)}
compute_flaky_report · Database
2 ms
apps/projects/flakiness.py:186
perfs = list(perfs)
observations_for · Database
2 ms

Fixtures

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

Database

14 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:635
11 ms
call _post_teardown
django/test/testcases.py:1240
2 ms
setup pytest internals 0.69 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 14 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 13 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 15 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 9 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 15 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 16 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 10 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 15 ms 78a4357 main Profile