Tests / confs/tests.py
TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
37 ms
median 37 ms
max 57 ms
max 57 ms
Phases
Setup 2 ms
Call 35 ms
Teardown 0.45 ms
Categories
Database 29 ms
Factories 2 ms
App code 0.18 ms
Other (Libraries, pytest, Unsampled, Mocking, ...) 6 ms
17 database queries per run
Needs 18 KB of memory (max 44 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup0.87 ms5.2%
__init____init__:-10.87 ms5.2%
signature<stdlib>/inspect.py:33430.87 ms5.2%
Signature.from_callable<stdlib>/inspect.py:30580.87 ms5.2%
_signature_from_callable<stdlib>/inspect.py:25280.87 ms5.2%
_signature_from_function<stdlib>/inspect.py:23510.87 ms5.2%
call16 ms93.5%
TestSyncAnnouncements.test_leaves_already_posted_announcements_untouchedconfs/tests.py:102710 ms62.3%
TestSyncAnnouncements._syncconfs/tests.py:937 call_command("syncannouncements")10 ms62.3%
call_commanddjango/core/management/__init__.py:19510 ms62.3%
RichCommand.executedjango_rich/management/__init__.py:3410 ms62.3%
BaseCommand.executedjango/core/management/base.py:46610 ms62.3%
Command.handleconfs/management/commands/syncannouncements.py:1310 ms62.3%
sync_upcomingconfs/conference_announcements.py:107 for conference in upcoming:5 ms31.2%
QuerySet.__iter__django/db/models/query.py:4395 ms31.2%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms31.2%
ModelIterable.__iter__django/db/models/query.py:1035 ms31.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms31.2%
CursorWrapper.executedjango/db/backends/utils.py:795 ms31.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms31.2%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms31.2%
Cursor.executepsycopg/cursor.py:1135 ms31.2%
Connection.waitpsycopg/connection.py:4955 ms31.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms31.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms31.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms31.2%
sync_upcomingconfs/conference_announcements.py:1085 ms31.2%
sync_conferenceconfs/conference_announcements.py:85 announcement = announcement_model.objects.create(5 ms31.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms31.2%
QuerySet.createdjango/db/models/query.py:7365 ms31.2%
Model.savedjango/db/models/base.py:9045 ms31.2%
Model.save_basedjango/db/models/base.py:9965 ms31.2%
Model._save_tabledjango/db/models/base.py:11995 ms31.2%
Model._do_insertdjango/db/models/base.py:12515 ms31.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms31.2%
QuerySet._insertdjango/db/models/query.py:21415 ms31.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19365 ms31.2%
CursorWrapper.executedjango/db/backends/utils.py:795 ms31.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms31.2%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms31.2%
Cursor.executepsycopg/cursor.py:1135 ms31.2%
Connection.waitpsycopg/connection.py:4955 ms31.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms31.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms31.2%
TestSyncAnnouncements.test_leaves_already_posted_announcements_untouchedconfs/tests.py:1026 conference = self._conference()5 ms31.2%
TestSyncAnnouncements._conferenceconfs/tests.py:933 return baker.make(Conference, **defaults)5 ms31.2%
makemodel_bakery/baker.py:1755 ms31.2%
Baker.makemodel_bakery/baker.py:4545 ms31.2%
Baker._makemodel_bakery/baker.py:5015 ms31.2%
Baker._skip_fieldmodel_bakery/baker.py:7675 ms31.2%
Estimated from 4 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:933
return baker.make(Conference, **defaults)
TestSyncAnnouncements._conference
· Factories
|
5 ms |
|
confs/conference_announcements.py:107
for conference in upcoming:
sync_upcoming
· Database
|
5 ms |
|
confs/conference_announcements.py:85
announcement = announcement_model.objects.create(
sync_conference
· Database
|
5 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
17 queries · 6 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
SELECT "confs_conference"."id", "confs_conference"."name", "confs_conference"."slug", "confs_conference"."location", "confs_conference"."start_date", "confs_conference"."end_date", "confs_conference"."time_zone", "confs_conference"."archived_date", "confs_conference"."approved_at", "confs_conferenc…
Biggest pieces of work
|
call test body
confs/tests.py:1026
|
16 ms |
|
setup __init__
__init__:-1
|
0.87 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 | 17 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 22 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 37 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 19 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 31 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 52 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 55 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 37 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 48 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 22 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 35 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 54 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 57 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 21 ms | Run |