Tests / apps/api/tests.py
ProfileUploadTest::test_processing_failure_is_recorded
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
11 ms
median 12 ms
max 15 ms
max 15 ms
Phases
Setup 0.64 ms
Call 10 ms
Teardown 0.15 ms
Categories
Database 9 ms
App code 0.15 ms
Other (Unsampled, Libraries, pytest) 2 ms
15 database queries per run
Needs 4 KB of memory (max 12 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call9 ms92.9%
ProfileUploadTest.test_processing_failure_is_recordedapps/api/tests.py:905 profile = Profile.objects.create(project=self.project)2 ms23.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms23.2%
QuerySet.createdjango/db/models/query.py:6692 ms23.2%
Profile.saveapps/projects/models.py:466 super().save(*args, **kwargs)2 ms23.2%
Model.savedjango/db/models/base.py:8742 ms23.2%
Model.save_basedjango/db/models/base.py:9662 ms23.2%
Model._save_tabledjango/db/models/base.py:11672 ms23.2%
Model._do_insertdjango/db/models/base.py:12182 ms23.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms23.2%
QuerySet._insertdjango/db/models/query.py:19182 ms23.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms23.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms23.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms23.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms23.2%
Cursor.executepsycopg/cursor.py:1132 ms23.2%
Connection.waitpsycopg/connection.py:4952 ms23.2%
ProfileUploadTest.test_processing_failure_is_recordedapps/api/tests.py:9082 ms23.2%
_SharedTaskProxy.__call__potatoq/app.py:7632 ms23.2%
Task.__call__potatoq/task.py:1892 ms23.2%
process_profileapps/api/tasks.py:243 ProfilePart.objects.filter(pk=part_id).update(status=ProfilePart.StatusTypes.FAILED, error=error)2 ms23.2%
ProfileUploadTest.test_processing_failure_is_recordedapps/api/tests.py:909 profile.refresh_from_db()2 ms23.2%
Model.refresh_from_dbdjango/db/models/base.py:7582 ms23.2%
QuerySet.getdjango/db/models/query.py:6352 ms23.2%
QuerySet.__len__django/db/models/query.py:3722 ms23.2%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms23.2%
ModelIterable.__iter__django/db/models/query.py:952 ms23.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms23.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms23.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms23.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms23.2%
Cursor.executepsycopg/cursor.py:1132 ms23.2%
Connection.waitpsycopg/connection.py:4952 ms23.2%
ProfileUploadTest.test_processing_failure_is_recordedapps/api/tests.py:910 part.refresh_from_db()2 ms23.2%
Model.refresh_from_dbdjango/db/models/base.py:7592 ms23.2%
Model.get_deferred_fieldsdjango/db/models/base.py:7022 ms23.2%
Estimated from 4 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/projects/models.py:466
super().save(*args, **kwargs)
Profile.save
· Database
|
2 ms |
|
apps/api/tasks.py:243
ProfilePart.objects.filter(pk=part_id).update(status=ProfilePart.StatusTypes.FAILED, error=error)
process_profile
· App code
|
2 ms |
|
apps/api/tests.py:909
profile.refresh_from_db()
ProfileUploadTest.test_processing_failure_is_recorded
· Database
|
2 ms |
|
apps/api/tests.py:910
part.refresh_from_db()
ProfileUploadTest.test_processing_failure_is_recorded
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
15 queries · 4 ms
Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).
3×
SELECT "projects_profilepart"."id", "projects_profilepart"."profile_id", "projects_profilepart"."index", "projects_profilepart"."count", "projects_profilepart"."checksum", "projects_profilepart"."status", "projects_profilepart"."error", "projects_profilepart"."tests_count", "projects_profilepart"."…
Biggest pieces of work
|
call test body
apps/api/tests.py:905
|
9 ms |
Reliability
15 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 15 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 9 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 13 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 7 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 8 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 15 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 8 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 13 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 13 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 | 15 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 8 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 13 ms | Profile |