Tests / confs/tests.py
TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
First seen 3 weeks ago in 0c23747
CI
github-actions:test
11 runs
Average
16 ms
median 14 ms
max 28 ms
max 28 ms
Phases
Setup 2 ms
Call 13 ms
Teardown 0.56 ms
Categories
Database 12 ms
App code 0.20 ms
Other (Unsampled, Libraries, pytest) 3 ms
11 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, 7 hours ago ·
open run
setup2 ms12.7%
call16 ms86.1%
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batchconfs/tests.py:3218 ms43.0%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:233 for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):5 ms24.6%
QuerySet.__iter__django/db/models/query.py:4395 ms24.6%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms24.6%
ModelIterable.__iter__django/db/models/query.py:1035 ms24.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16254 ms18.4%
CursorWrapper.executedjango/db/backends/utils.py:794 ms18.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms18.4%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms18.4%
Cursor.executepsycopg/cursor.py:1134 ms18.4%
Connection.waitpsycopg/connection.py:4954 ms18.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms18.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms18.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms18.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16121 ms6.1%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7961 ms6.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5791 ms6.1%
WhereNode.as_sqldjango/db/models/sql/where.py:1511 ms6.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5791 ms6.1%
WhereNode.as_sqldjango/db/models/sql/where.py:1511 ms6.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5791 ms6.1%
WhereNode.as_sqldjango/db/models/sql/where.py:1511 ms6.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5791 ms6.1%
Exact.as_sqldjango/db/models/lookups.py:4071 ms6.1%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2272 ms12.3%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:2 ms12.3%
QuerySet.__iter__django/db/models/query.py:4392 ms12.3%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms12.3%
ModelIterable.__iter__django/db/models/query.py:1032 ms12.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms12.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms12.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms12.3%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms12.3%
Cursor.executepsycopg/cursor.py:1132 ms12.3%
Connection.waitpsycopg/connection.py:4952 ms12.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms12.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms12.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms12.3%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:250 account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)1 ms6.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms6.1%
QuerySet.bulk_createdjango/db/models/query.py:9001 ms6.1%
QuerySet._batched_insertdjango/db/models/query.py:21791 ms6.1%
QuerySet._insertdjango/db/models/query.py:21411 ms6.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms6.1%
Cursor.executepsycopg/cursor.py:1131 ms6.1%
Connection.waitpsycopg/connection.py:4951 ms6.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms6.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms6.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms6.1%
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batchconfs/tests.py:349 self.assertEqual(Account.objects.filter(username="shared").count(), 1)5 ms24.6%
QuerySet.countdjango/db/models/query.py:6775 ms24.6%
Query.get_countdjango/db/models/sql/query.py:6575 ms24.6%
Query.get_aggregationdjango/db/models/sql/query.py:6395 ms24.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms24.6%
CursorWrapper.executedjango/db/backends/utils.py:795 ms24.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms24.6%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms24.6%
Cursor.executepsycopg/cursor.py:1135 ms24.6%
Connection.waitpsycopg/connection.py:4955 ms24.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms24.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms24.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms24.6%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()2 ms12.3%
TestCase._fixture_setupdjango/test/testcases.py:14812 ms12.3%
TestCase._enter_atomicsdjango/test/testcases.py:13992 ms12.3%
Atomic.__enter__django/db/transaction.py:2232 ms12.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms12.3%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms12.3%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms12.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms12.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms12.3%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms12.3%
Cursor.executepsycopg/cursor.py:1132 ms12.3%
Connection.waitpsycopg/connection.py:4952 ms12.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms12.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms12.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms12.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms6.1%
TestCase._fixture_teardowndjango/test/testcases.py:15001 ms6.1%
TestCase._rollback_atomicsdjango/test/testcases.py:14081 ms6.1%
Atomic.__exit__django/db/transaction.py:2951 ms6.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms6.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131 ms6.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711 ms6.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms6.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms6.1%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms6.1%
Cursor.executepsycopg/cursor.py:1131 ms6.1%
Connection.waitpsycopg/connection.py:4951 ms6.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms6.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms6.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms6.1%
Estimated from 16 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:349
self.assertEqual(Account.objects.filter(username="shared").count(), 1)
TestResolveLegacyAccountsAndPosts.test_dedupes_same_url_and_same_pair_in_one_batch
· Database
|
5 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:233
for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):
_resolve_accounts
· Database
|
5 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:194
for account in accounts:
_index_accounts
· Database
|
2 ms |
|
confs/migrations/0033_remove_legacy_conference_tables.py:250
account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)
_resolve_accounts
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 1 ms |
| _django_clear_site_cache function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.06 ms |
| _django_db_marker function | 0.06 ms |
| _django_isolate_apps function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _live_server_helper function | 0.05 ms |
| monkeypatch function | 0.03 ms |
Database
11 queries · 12 msNo repeated queries.
Biggest pieces of work
|
call test body
confs/tests.py:349
|
13 ms |
| setup pytest internals | 2 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
2 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
1 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 19 ms | Profile |
| 16 hours ago | CI github-actions:test | passed | 6 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 14 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 9 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 19 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 16 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 14 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 28 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 24 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 11 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 8 ms | Run |