flakytest.dev anze3db fedidevs
Tests / confs/tests.py

TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account

First seen 14 hours ago in 0c23747
CI github-actions:test 4 runs
Average
32 ms
median 34 ms
max 42 ms
Phases
Setup 6 ms Call 25 ms Teardown 0.37 ms
Categories
Database 22 ms Factories 2 ms Other (pytest, Libraries, Unsampled) 8 ms

10 database queries per run

Needs 1 KB of memory (max 4 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 9 hours ago · open run
Hide pytest frames
setup1 ms6.4%
CallInfo.from_call_pytest/runner.py:3611 ms6.4%
call_and_report.<locals>.<lambda>_pytest/runner.py:2501 ms6.4%
HookCaller.__call__pluggy/_hooks.py:5121 ms6.4%
PluginManager._hookexecpluggy/_manager.py:1201 ms6.4%
_multicallpluggy/_callers.py:1211 ms6.4%
pytest_runtest_setup_pytest/runner.py:1701 ms6.4%
call15 ms90.0%
CallInfo.from_call_pytest/runner.py:36115 ms90.0%
call_and_report.<locals>.<lambda>_pytest/runner.py:25015 ms90.0%
HookCaller.__call__pluggy/_hooks.py:51215 ms90.0%
PluginManager._hookexecpluggy/_manager.py:12015 ms90.0%
_multicallpluggy/_callers.py:12114 ms84.0%
pytest_runtest_call_pytest/runner.py:18414 ms84.0%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:61414 ms84.0%
SimpleTestCase.__call__django/test/testcases.py:31414 ms84.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36912 ms72.0%
TestCase.__call__<stdlib>/unittest/case.py:74712 ms72.0%
TestCase.run<stdlib>/unittest/case.py:69112 ms72.0%
TestCase._callTestMethod<stdlib>/unittest/case.py:63712 ms72.0%
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_accountconfs/tests.py:360 resolve = _legacy_migration()._resolve_posts(6 ms36.0%
_resolve_postsconfs/migrations/0033_remove_legacy_conference_tables.py:279 post_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)3 ms18.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms18.0%
QuerySet.bulk_createdjango/db/models/query.py:9003 ms18.0%
QuerySet._batched_insertdjango/db/models/query.py:21793 ms18.0%
QuerySet._insertdjango/db/models/query.py:21413 ms18.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19363 ms18.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms18.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms18.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1003 ms18.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms18.0%
Cursor.executepsycopg/cursor.py:1133 ms18.0%
Connection.waitpsycopg/connection.py:4953 ms18.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2053 ms18.0%
BaseCursor._convert_querypsycopg/_cursor_base.py:4653 ms18.0%
PostgresClientQuery.convertpsycopg/_queries.py:2893 ms18.0%
PostgresClientQuery.dumppsycopg/_queries.py:2993 ms18.0%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3003 ms18.0%
Dumper.quotepsycopg/adapt.py:593 ms18.0%
_JsonDumper.dumppsycopg/types/json.py:2183 ms18.0%
dumps<stdlib>/json/__init__.py:2343 ms18.0%
JSONEncoder.encode<stdlib>/json/encoder.py:2023 ms18.0%
JSONEncoder.iterencode<stdlib>/json/encoder.py:2543 ms18.0%
_resolve_postsconfs/migrations/0033_remove_legacy_conference_tables.py:283 for post in _filter_by_pairs(post_model.objects, "post_id", "account_id", chunk).defer(3 ms18.0%
QuerySet.__iter__django/db/models/query.py:4392 ms12.0%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms12.0%
ModelIterable.__iter__django/db/models/query.py:1032 ms12.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms12.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms12.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms12.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms12.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms12.0%
Cursor.executepsycopg/cursor.py:1132 ms12.0%
Connection.waitpsycopg/connection.py:4952 ms12.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms12.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms12.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms12.0%
_filter_by_pairsconfs/migrations/0033_remove_legacy_conference_tables.py:207 return queryset.filter(query)0.99 ms6.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms6.0%
QuerySet.filterdjango/db/models/query.py:16760.99 ms6.0%
QuerySet._filter_or_excludedjango/db/models/query.py:16940.99 ms6.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17040.99 ms6.0%
Query.add_qdjango/db/models/sql/query.py:16810.99 ms6.0%
Query._add_qdjango/db/models/sql/query.py:17130.99 ms6.0%
Query.build_filterdjango/db/models/sql/query.py:15280.99 ms6.0%
Query._add_qdjango/db/models/sql/query.py:17130.99 ms6.0%
Query.build_filterdjango/db/models/sql/query.py:15540.99 ms6.0%
Query.check_filterabledjango/db/models/sql/query.py:14110.99 ms6.0%
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_accountconfs/tests.py:352 account = baker.make(Account, username="carol")3 ms18.0%
makemodel_bakery/baker.py:1753 ms18.0%
Baker.makemodel_bakery/baker.py:4543 ms18.0%
Baker._makemodel_bakery/baker.py:5422 ms12.0%
Baker.instancemodel_bakery/baker.py:6592 ms12.0%
Model.savedjango/db/models/base.py:8600.99 ms6.0%
ConnectionRouter._router_func.<locals>._route_dbdjango/db/utils.py:2350.99 ms6.0%
Model.savedjango/db/models/base.py:9040.99 ms6.0%
Model.save_basedjango/db/models/base.py:9960.99 ms6.0%
Model._save_tabledjango/db/models/base.py:11990.99 ms6.0%
Model._do_insertdjango/db/models/base.py:12510.99 ms6.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms6.0%
QuerySet._insertdjango/db/models/query.py:21410.99 ms6.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.99 ms6.0%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms6.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms6.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1000.99 ms6.0%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms6.0%
Cursor.executepsycopg/cursor.py:1130.99 ms6.0%
Connection.waitpsycopg/connection.py:4950.99 ms6.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms6.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms6.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms6.0%
Baker._makemodel_bakery/baker.py:5290.99 ms6.0%
Baker.generate_valuemodel_bakery/baker.py:10190.99 ms6.0%
gen_urlmodel_bakery/random_gen.py:3200.99 ms6.0%
gen_stringmodel_bakery/random_gen.py:2700.99 ms6.0%
gen_string.<locals>.<genexpr>model_bakery/random_gen.py:2700.99 ms6.0%
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_accountconfs/tests.py:353 existing = baker.make(2 ms12.0%
makemodel_bakery/baker.py:1752 ms12.0%
Baker.makemodel_bakery/baker.py:4542 ms12.0%
Baker._makemodel_bakery/baker.py:4940.99 ms6.0%
Baker._clean_attrsmodel_bakery/baker.py:7070.99 ms6.0%
ABCMeta.__instancecheck__<frozen abc>:1190.99 ms6.0%
ABCMeta.__subclasscheck__<frozen abc>:1230.99 ms6.0%
Iterator.__subclasshook__<frozen _collections_abc>:3160.99 ms6.0%
_check_methods<frozen _collections_abc>:1120.99 ms6.0%
Baker._makemodel_bakery/baker.py:5420.99 ms6.0%
Baker.instancemodel_bakery/baker.py:6590.99 ms6.0%
Model.savedjango/db/models/base.py:9040.99 ms6.0%
Model.save_basedjango/db/models/base.py:9960.99 ms6.0%
Model._save_tabledjango/db/models/base.py:11990.99 ms6.0%
Model._do_insertdjango/db/models/base.py:12510.99 ms6.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms6.0%
QuerySet._insertdjango/db/models/query.py:21410.99 ms6.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19350.99 ms6.0%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:19100.99 ms6.0%
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_accountconfs/tests.py:373 self.assertEqual(Post.objects.filter(account=account).count(), 1)0.99 ms6.0%
QuerySet.countdjango/db/models/query.py:6770.99 ms6.0%
Query.get_countdjango/db/models/sql/query.py:6570.99 ms6.0%
Query.get_aggregationdjango/db/models/sql/query.py:6390.99 ms6.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms6.0%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms6.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms6.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1000.99 ms6.0%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms6.0%
Cursor.executepsycopg/cursor.py:1130.99 ms6.0%
Connection.waitpsycopg/connection.py:4950.99 ms6.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms6.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms6.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms6.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3722 ms12.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms12.0%
TestCase._fixture_teardowndjango/test/testcases.py:14970.99 ms6.0%
TestCase._should_check_constraintsdjango/test/testcases.py:15060.99 ms6.0%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5040.99 ms6.0%
Cursor.executepsycopg/cursor.py:1130.99 ms6.0%
Connection.waitpsycopg/connection.py:4950.99 ms6.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms6.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms6.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms6.0%
TestCase._fixture_teardowndjango/test/testcases.py:14980.99 ms6.0%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4950.99 ms6.0%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms6.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms6.0%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1000.99 ms6.0%
CursorWrapper._executedjango/db/backends/utils.py:1030.99 ms6.0%
Cursor.executepsycopg/cursor.py:1130.99 ms6.0%
Connection.waitpsycopg/connection.py:4950.99 ms6.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms6.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms6.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms6.0%
_multicallpluggy/_callers.py:1520.99 ms6.0%
CaptureManager.pytest_runtest_call_pytest/capture.py:8990.99 ms6.0%
_GeneratorContextManager.__exit__<stdlib>/contextlib.py:2100.99 ms6.0%
CaptureManager.item_capture_pytest/capture.py:8670.99 ms6.0%
Estimated from 16 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

confs/migrations/0033_remove_legacy_conference_tables.py:279
post_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)
_resolve_posts · Database
3 ms
confs/tests.py:352
account = baker.make(Account, username="carol")
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_account · Database
3 ms
confs/migrations/0033_remove_legacy_conference_tables.py:283
for post in _filter_by_pairs(post_model.objects, "post_id", "account_id", chunk).defer(
_resolve_posts · Database
2 ms
confs/tests.py:353
existing = baker.make(
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_account · Factories
2 ms
confs/migrations/0033_remove_legacy_conference_tables.py:207
return queryset.filter(query)
_filter_by_pairs · Database
0.99 ms
confs/tests.py:373
self.assertEqual(Post.objects.filter(account=account).count(), 1)
TestResolveLegacyAccountsAndPosts.test_match_existing_post_by_post_id_and_account · Database
0.99 ms

Fixtures

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

Database

10 queries · 8 ms
No repeated queries.

Biggest pieces of work

call test body
confs/tests.py:360
12 ms
call _post_teardown
django/test/testcases.py:1243
2 ms
setup pytest internals 1 ms
call pytest internals 0.99 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
9 hours ago CI github-actions:test passed 17 ms d923a46 main Profile
9 hours ago CI github-actions:test passed 42 ms 82997f8 main Profile
9 hours ago CI github-actions:test passed 36 ms 623aa3e main Profile
14 hours ago CI github-actions:test passed 33 ms ab6465a main Profile
14 hours ago CI github-actions:test passed 11 ms 0c23747 main Run