Tests / confs/tests.py
TestSyncAnnouncements::test_skips_pending_conferences
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
15 ms
median 14 ms
max 30 ms
max 30 ms
Phases
Setup 2 ms
Call 13 ms
Teardown 0.35 ms
Categories
Database 10 ms
Factories 0.48 ms
Test code 0.08 ms
Other (Libraries, pytest, Mocking, Unsampled, ...) 4 ms
8 database queries per run
Needs 9 KB of memory (max 20 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call11 ms92.8%
TestSyncAnnouncements.test_skips_pending_conferencesconfs/tests.py:10055 ms38.6%
TestSyncAnnouncements._syncconfs/tests.py:937 call_command("syncannouncements")4 ms30.9%
call_commanddjango/core/management/__init__.py:1954 ms30.9%
RichCommand.executedjango_rich/management/__init__.py:344 ms30.9%
BaseCommand.executedjango/core/management/base.py:4664 ms30.9%
Command.handleconfs/management/commands/syncannouncements.py:134 ms30.9%
sync_upcomingconfs/conference_announcements.py:107 for conference in upcoming:3 ms23.2%
QuerySet.__iter__django/db/models/query.py:4393 ms23.2%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms23.2%
ModelIterable.__iter__django/db/models/query.py:1032 ms15.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16120.91 ms7.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7930.91 ms7.7%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11600.91 ms7.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.91 ms7.7%
Join.as_sqldjango/db/models/sql/datastructures.py:910.91 ms7.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5750.91 ms7.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.91 ms7.7%
CursorWrapper.executedjango/db/backends/utils.py:790.91 ms7.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.91 ms7.7%
CursorWrapper._executedjango/db/backends/utils.py:1050.91 ms7.7%
Cursor.executepsycopg/cursor.py:1130.91 ms7.7%
Connection.waitpsycopg/connection.py:4950.91 ms7.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.91 ms7.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.91 ms7.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.91 ms7.7%
ModelIterable.__iter__django/db/models/query.py:1350.91 ms7.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15780.91 ms7.7%
SQLCompiler.get_convertersdjango/db/models/sql/compiler.py:15190.91 ms7.7%
sync_upcomingconfs/conference_announcements.py:104 upcoming = conference_model.objects.filter(0.91 ms7.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.91 ms7.7%
QuerySet.filterdjango/db/models/query.py:16760.91 ms7.7%
QuerySet._filter_or_excludedjango/db/models/query.py:16940.91 ms7.7%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17040.91 ms7.7%
Query.add_qdjango/db/models/sql/query.py:16810.91 ms7.7%
Query._add_qdjango/db/models/sql/query.py:17130.91 ms7.7%
Query.build_filterdjango/db/models/sql/query.py:16130.91 ms7.7%
Query.build_lookupdjango/db/models/sql/query.py:14300.91 ms7.7%
BaseExpression.get_lookupdjango/db/models/expressions.py:4040.91 ms7.7%
RegisterLookupMixin.get_lookupdjango/db/models/query_utils.py:3500.91 ms7.7%
RegisterLookupMixin._get_lookupdjango/db/models/query_utils.py:3290.91 ms7.7%
TestSyncAnnouncements._syncconfs/tests.py:936 with mock.patch("confs.management.commands.syncannouncements.timezone.now", return_value=self.NOW):0.91 ms7.7%
_patch.__enter__<stdlib>/unittest/mock.py:15720.91 ms7.7%
MagicMixin.__init__<stdlib>/unittest/mock.py:21870.91 ms7.7%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()3 ms23.2%
TestCase._fixture_setupdjango/test/testcases.py:14813 ms23.2%
TestCase._enter_atomicsdjango/test/testcases.py:13993 ms23.2%
Atomic.__enter__django/db/transaction.py:2233 ms23.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms23.2%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms23.2%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms23.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms23.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms23.2%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms23.2%
Cursor.executepsycopg/cursor.py:1133 ms23.2%
Connection.waitpsycopg/connection.py:4953 ms23.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms23.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms23.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms23.2%
TestSyncAnnouncements.test_skips_pending_conferencesconfs/tests.py:1003 self._conference(slug="pending", approved_at=None)2 ms15.5%
TestSyncAnnouncements._conferenceconfs/tests.py:933 return baker.make(Conference, **defaults)2 ms15.5%
makemodel_bakery/baker.py:1752 ms15.5%
Baker.makemodel_bakery/baker.py:4542 ms15.5%
Baker._makemodel_bakery/baker.py:5422 ms15.5%
Baker.instancemodel_bakery/baker.py:6290.91 ms7.7%
Baker._classify_attrsmodel_bakery/baker.py:5860.91 ms7.7%
Baker.instancemodel_bakery/baker.py:6590.91 ms7.7%
Model.savedjango/db/models/base.py:9040.91 ms7.7%
Model.save_basedjango/db/models/base.py:9960.91 ms7.7%
Model._save_tabledjango/db/models/base.py:11990.91 ms7.7%
Model._do_insertdjango/db/models/base.py:12510.91 ms7.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.91 ms7.7%
QuerySet._insertdjango/db/models/query.py:21410.91 ms7.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.91 ms7.7%
CursorWrapper.executedjango/db/backends/utils.py:790.91 ms7.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.91 ms7.7%
CursorWrapper._executedjango/db/backends/utils.py:1050.91 ms7.7%
Cursor.executepsycopg/cursor.py:1130.91 ms7.7%
Connection.waitpsycopg/connection.py:4950.91 ms7.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.91 ms7.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.91 ms7.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.91 ms7.7%
TestSyncAnnouncements.test_skips_pending_conferencesconfs/tests.py:1007 self.assertEqual(Announcement.objects.count(), 0)0.91 ms7.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.91 ms7.7%
QuerySet.countdjango/db/models/query.py:6770.91 ms7.7%
Query.get_countdjango/db/models/sql/query.py:6570.91 ms7.7%
Count.__init__django/db/models/aggregates.py:3070.91 ms7.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()0.91 ms7.7%
TestCase._fixture_teardowndjango/test/testcases.py:14970.91 ms7.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15060.91 ms7.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5040.91 ms7.7%
Cursor.executepsycopg/cursor.py:1130.91 ms7.7%
Connection.waitpsycopg/connection.py:4950.91 ms7.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.91 ms7.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.91 ms7.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.91 ms7.7%
Estimated from 12 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/conference_announcements.py:107
for conference in upcoming:
sync_upcoming
· Database
|
3 ms |
|
confs/tests.py:933
return baker.make(Conference, **defaults)
TestSyncAnnouncements._conference
· Factories
|
2 ms |
|
confs/tests.py:936
with mock.patch("confs.management.commands.syncannouncements.timezone.now", return_value=self.NOW):
TestSyncAnnouncements._sync
· Mocking
|
0.91 ms |
|
confs/conference_announcements.py:104
upcoming = conference_model.objects.filter(
sync_upcoming
· Database
|
0.91 ms |
|
confs/tests.py:1007
self.assertEqual(Announcement.objects.count(), 0)
TestSyncAnnouncements.test_skips_pending_conferences
· Database
|
0.91 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.03 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
8 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call test body
confs/tests.py:1003
|
7 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
3 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
0.91 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 12 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 10 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 8 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 15 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 8 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 17 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 14 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 18 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 26 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 30 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 7 ms | Run |