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

FlakyReportTest::test_window

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
12 ms
median 13 ms
max 17 ms
Phases
Setup 0.62 ms Call 10 ms Teardown 0.96 ms
Categories
Database 9 ms App code 0.09 ms Other (Unsampled, pytest, Deep copies) 2 ms

13 database queries per run

Needs 0 KB of memory (max 4 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.8%
call10 ms86.9%
FlakyReportTest.test_windowapps/projects/tests.py:639 report = flaky_report(self.project, days=2)8 ms65.2%
flaky_reportapps/projects/flakiness.py:2536 ms54.3%
compute_flaky_reportapps/projects/flakiness.py:2683 ms21.7%
failing_test_idsapps/projects/flakiness.py:202 ids = set(1 ms10.9%
QuerySet.__iter__django/db/models/query.py:3901 ms10.9%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms10.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2771 ms10.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms10.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms10.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms10.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms10.9%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
failing_test_idsapps/projects/flakiness.py:212 ids |= set(1 ms10.9%
QuerySet.__iter__django/db/models/query.py:3901 ms10.9%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms10.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2771 ms10.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms10.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms10.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms10.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms10.9%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
compute_flaky_reportapps/projects/flakiness.py:2723 ms21.7%
observations_forapps/projects/flakiness.py:165 test_runs = list(test_runs)1 ms10.9%
QuerySet.__iter__django/db/models/query.py:3901 ms10.9%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms10.9%
ValuesListIterable.__iter__django/db/models/query.py:2381 ms10.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms10.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms10.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms10.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms10.9%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
observations_forapps/projects/flakiness.py:186 perfs = list(perfs)1 ms10.9%
QuerySet.__iter__django/db/models/query.py:3901 ms10.9%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms10.9%
ValuesListIterable.__iter__django/db/models/query.py:2381 ms10.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms10.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16111 ms10.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7921 ms10.9%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11611 ms10.9%
compute_flaky_reportapps/projects/flakiness.py:271 tests = {test.id: test for test in Test.objects.filter(id__in=ids)}1 ms10.9%
QuerySet.__iter__django/db/models/query.py:3901 ms10.9%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms10.9%
ModelIterable.__iter__django/db/models/query.py:1071 ms10.9%
flaky_reportapps/projects/flakiness.py:2501 ms10.9%
data_versionapps/projects/flakiness.py:229 profile = Profile.objects.filter(project=project).aggregate(latest=Max("date_processed"))["latest"]1 ms10.9%
QuerySet.aggregatedjango/db/models/query.py:5941 ms10.9%
Query.get_aggregationdjango/db/models/sql/query.py:6331 ms10.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms10.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms10.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms10.9%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms21.7%
TestCase._fixture_teardowndjango/test/testcases.py:14941 ms10.9%
TestCase._should_check_constraintsdjango/test/testcases.py:15031 ms10.9%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4921 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
TestCase._fixture_teardowndjango/test/testcases.py:14951 ms10.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4841 ms10.9%
CursorWrapper.executedjango/db/backends/utils.py:791 ms10.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms10.9%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms10.9%
Cursor.executepsycopg/cursor.py:1131 ms10.9%
Connection.waitpsycopg/connection.py:4951 ms10.9%
teardown0.87 ms7.3%
TestCase.tearDownClassdjango/test/testcases.py:1453 cls._rollback_atomics(cls.cls_atomics)0.87 ms7.3%
TestCase._rollback_atomicsdjango/test/testcases.py:14050.87 ms7.3%
Atomic.__exit__django/db/transaction.py:2950.87 ms7.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.87 ms7.3%
BaseDatabaseWrapper.rollbackdjango/db/backends/base/base.py:3370.87 ms7.3%
BaseDatabaseWrapper._rollbackdjango/db/backends/base/base.py:3080.87 ms7.3%
Connection.rollbackpsycopg/connection.py:3140.87 ms7.3%
Connection.waitpsycopg/connection.py:4950.87 ms7.3%
Estimated from 10 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

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: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:186
perfs = list(perfs)
observations_for · Database
1 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.04 ms
_live_server_helper function 0.04 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

13 queries · 5 ms
No repeated queries.

Biggest pieces of work

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