flakytest.dev anze3db flakytest
Tests / apps/api/tests.py

ProfileUploadTest::test_a_failed_part_can_be_uploaded_again

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
101 ms
median 111 ms
max 135 ms
Phases
Setup 0.73 ms Call 100 ms Teardown 0.16 ms
Categories
Database 75 ms App code 1 ms Test code 0.55 ms Other (Libraries, Unsampled, Serialization, Mocking, ...) 25 ms

95 database queries per run

Needs 3 KB of memory (max 16 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
setup0.60 ms0.7%
call88 ms99.1%
ProfileUploadTest.test_a_failed_part_can_be_uploaded_againapps/api/tests.py:882 self.upload(document)54 ms60.9%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(29 ms33.0%
Client.postdjango/test/client.py:115329 ms33.0%
RequestFactory.postdjango/test/client.py:49929 ms33.0%
RequestFactory.genericdjango/test/client.py:67129 ms33.0%
Client.requestdjango/test/client.py:108229 ms33.0%
ClientHandler.__call__django/test/client.py:17316 ms17.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6214 ms15.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10414 ms15.7%
WhiteNoise.add_fileswhitenoise/base.py:10814 ms15.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12011 ms12.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13111 ms12.2%
WhiteNoise.get_static_filewhitenoise/base.py:2089 ms10.4%
StaticFile.__init__whitenoise/responders.py:775 ms5.2%
StaticFile.get_alternativeswhitenoise/responders.py:2015 ms5.2%
Headers.__setitem__<stdlib>/wsgiref/headers.py:625 ms5.2%
Headers.__delitem__<stdlib>/wsgiref/headers.py:725 ms5.2%
<GC>~5 ms5.2%
StaticFile.__init__whitenoise/responders.py:762 ms1.7%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms1.7%
Headers.__contains__<stdlib>/wsgiref/headers.py:872 ms1.7%
Headers.get<stdlib>/wsgiref/headers.py:1062 ms1.7%
StaticFile.__init__whitenoise/responders.py:732 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1782 ms1.7%
parsedate<stdlib>/email/_parseaddr.py:1852 ms1.7%
StaticFile.__init__whitenoise/responders.py:742 ms1.7%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms1.7%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms1.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms1.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms1.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms1.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms1.7%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms1.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1862 ms1.7%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2122 ms1.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1192 ms1.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1222 ms1.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:962 ms1.7%
ClientHandler.__call__django/test/client.py:18614 ms15.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14114 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13014 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12314 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3414 ms15.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms15.7%
BaseHandler._get_responsedjango/core/handlers/base.py:19814 ms15.7%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6514 ms15.7%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3714 ms15.7%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6414 ms15.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:75 return view_func(request, *args, **kwargs)9 ms10.4%
profile_uploadapps/api/urls.py:1505 ms5.2%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
get_or_create_numberedapps/projects/models.py:212 ms1.7%
next_numberapps/projects/models.py:35 return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 12 ms1.7%
QuerySet.aggregatedjango/db/models/query.py:5942 ms1.7%
Query.get_aggregationdjango/db/models/sql/query.py:6332 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
get_or_create_numberedapps/projects/models.py:24 return model.objects.create(project=project, number=number, **lookup, **(defaults or {})), True2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.createdjango/db/models/query.py:6692 ms1.7%
Profile.saveapps/projects/models.py:466 super().save(*args, **kwargs)2 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11672 ms1.7%
Model._do_insertdjango/db/models/base.py:12182 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
profile_uploadapps/api/urls.py:152 part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
profile_uploadapps/api/urls.py:154 part = ProfilePart.objects.create(2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.createdjango/db/models/query.py:6692 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11672 ms1.7%
Model._do_insertdjango/db/models/base.py:12182 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
profile_uploadapps/api/urls.py:163 url = request.build_absolute_uri(project.url("project_profile", profile.number))2 ms1.7%
Project.urlapps/projects/models.py:59 return reverse(name, args=[self.organization.slug, self.slug, *args])2 ms1.7%
reversedjango/urls/base.py:982 ms1.7%
URLResolver._reverse_with_prefixdjango/urls/resolvers.py:8032 ms1.7%
search<stdlib>/re/__init__.py:1792 ms1.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms3.5%
get_object_or_404django/shortcuts.py:903 ms3.5%
QuerySet.getdjango/db/models/query.py:6252 ms1.7%
QuerySet.filterdjango/db/models/query.py:15422 ms1.7%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms1.7%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms1.7%
Query.add_qdjango/db/models/sql/query.py:16712 ms1.7%
Query._add_qdjango/db/models/sql/query.py:17032 ms1.7%
Query.build_filterdjango/db/models/sql/query.py:16132 ms1.7%
Query.build_lookupdjango/db/models/sql/query.py:14302 ms1.7%
BaseExpression.get_lookupdjango/db/models/expressions.py:4042 ms1.7%
RegisterLookupMixin.get_lookupdjango/db/models/query_utils.py:3282 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms1.7%
Atomic.__exit__django/db/transaction.py:2472 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms1.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
ProfileUploadTest.uploadapps/api/tests.py:49525 ms27.8%
_SharedTaskProxy.__call__potatoq/app.py:76325 ms27.8%
Task.__call__potatoq/task.py:18925 ms27.8%
process_profileapps/api/tasks.py:23917 ms19.1%
process_profile_partapps/projects/profiles.py:381 profile = claim_part(part, document)6 ms7.0%
claim_partapps/projects/profiles.py:4173 ms3.5%
get_or_create_environmentapps/projects/environments.py:63 obj, created = Environment.objects.get_or_create(3 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.5%
QuerySet.get_or_createdjango/db/models/query.py:9872 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms1.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7952 ms1.7%
QuerySet.get_or_createdjango/db/models/query.py:9942 ms1.7%
QuerySet.createdjango/db/models/query.py:6692 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11672 ms1.7%
Model._do_insertdjango/db/models/base.py:12182 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
claim_partapps/projects/profiles.py:397 profile = Profile.objects.select_for_update(no_key=True).get(pk=part.profile_id)2 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1272 ms1.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15772 ms1.7%
SQLCompiler.get_convertersdjango/db/models/sql/compiler.py:15262 ms1.7%
Col.get_db_convertersdjango/db/models/expressions.py:13392 ms1.7%
Field.__eq__django/db/models/fields/__init__.py:6772 ms1.7%
claim_partapps/projects/profiles.py:399 ProfilePart.objects.filter(profile=profile, index=part.index, id__lt=part.id).delete() # superseded uploads2 ms1.7%
QuerySet.deletedjango/db/models/query.py:12382 ms1.7%
Collector.deletedjango/db/models/deletion.py:4712 ms1.7%
QuerySet._raw_deletedjango/db/models/query.py:12602 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:3833 ms3.5%
upsert_testsapps/projects/profiles.py:4903 ms3.5%
TestManager.upsertapps/projects/models.py:2292 ms1.7%
TestManager.slugs_forapps/projects/models.py:242 taken = set(self.filter(project_id=project_id, slug__in=set(new.values())).values_list("slug", flat=True))2 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms1.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
TestManager.upsertapps/projects/models.py:230 self.bulk_create( # sorted, so uploads sharing tests lock their rows in the same order2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.bulk_createdjango/db/models/query.py:8332 ms1.7%
QuerySet._batched_insertdjango/db/models/query.py:19562 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:384 write_perfs(profile, part, entries, tests)3 ms3.5%
write_perfsapps/projects/profiles.py:497 TestPerf.objects.bulk_create(2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.bulk_createdjango/db/models/query.py:8332 ms1.7%
QuerySet._batched_insertdjango/db/models/query.py:19562 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19242 ms1.7%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18132 ms1.7%
SQLInsertCompiler.prepare_valuedjango/db/models/sql/compiler.py:17422 ms1.7%
Atomic.__exit__django/db/transaction.py:2472 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms1.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:374 part = ProfilePart.objects.filter(pk=part.pk).first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:3802 ms1.7%
load_documentapps/projects/profiles.py:1332 ms1.7%
decompress<stdlib>/gzip.py:7012 ms1.7%
process_profile_partapps/projects/profiles.py:3852 ms1.7%
write_snapshotsapps/projects/profiles.py:352 cursor.executemany(SNAPSHOT_UPSERT, batch)2 ms1.7%
CursorWrapper.executemanydjango/db/backends/utils.py:842 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executemanydjango/db/backends/utils.py:1142 ms1.7%
Cursor.executemanypsycopg/cursor.py:1372 ms1.7%
Connection._pipeline_nolockpsycopg/connection.py:4722 ms1.7%
Pipeline.__exit__psycopg/_pipeline.py:732 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profileapps/api/tasks.py:2536 ms7.0%
_SharedTaskProxy.__call__potatoq/app.py:7636 ms7.0%
Task.__call__potatoq/task.py:1896 ms7.0%
finalize_profile_partsapps/api/tasks.py:2595 ms5.2%
finalize_profileapps/projects/profiles.py:522 for part in ProfilePart.objects.filter(profile=profile).defer("document").order_by("index", "id"):2 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms1.7%
finalize_profileapps/projects/profiles.py:527 ProfilePart.objects.filter(profile=profile).exclude(pk__in=[part.pk for part in current]).delete()2 ms1.7%
QuerySet.deletedjango/db/models/query.py:12382 ms1.7%
Collector.deletedjango/db/models/deletion.py:4712 ms1.7%
QuerySet._raw_deletedjango/db/models/query.py:12602 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
finalize_profileapps/projects/profiles.py:5352 ms1.7%
add_perfsapps/projects/rollups.py:88 TestDailyStats.objects.bulk_create(2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.bulk_createdjango/db/models/query.py:8332 ms1.7%
QuerySet._batched_insertdjango/db/models/query.py:19562 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19242 ms1.7%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18692 ms1.7%
SQLInsertCompiler.assemble_as_sqldjango/db/backends/postgresql/compiler.py:652 ms1.7%
ForeignKey.db_typedjango/db/models/fields/related.py:12232 ms1.7%
BigAutoField.rel_db_typedjango/db/models/fields/__init__.py:28822 ms1.7%
Field.__init__django/db/models/fields/__init__.py:2282 ms1.7%
finalize_profile_partsapps/api/tasks.py:2602 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms1.7%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profileapps/api/tasks.py:237 part = ProfilePart.objects.select_related("profile").get(id=part_id)2 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
ProfileUploadTest.test_a_failed_part_can_be_uploaded_againapps/api/tests.py:88531 ms34.8%
ProfileUploadTest.uploadapps/api/tests.py:49523 ms26.1%
_SharedTaskProxy.__call__potatoq/app.py:76323 ms26.1%
Task.__call__potatoq/task.py:18923 ms26.1%
process_profileapps/api/tasks.py:23922 ms24.3%
process_profile_partapps/projects/profiles.py:381 profile = claim_part(part, document)8 ms8.7%
claim_partapps/projects/profiles.py:4023 ms3.5%
add_perfsapps/projects/rollups.py:64 for row in TestDailyStats.objects.filter(2 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.7%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.7%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.7%
add_perfsapps/projects/rollups.py:88 TestDailyStats.objects.bulk_create(2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.bulk_createdjango/db/models/query.py:8162 ms1.7%
QuerySet._batched_insertdjango/db/models/query.py:19562 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
claim_partapps/projects/profiles.py:399 ProfilePart.objects.filter(profile=profile, index=part.index, id__lt=part.id).delete() # superseded uploads2 ms1.7%
QuerySet.deletedjango/db/models/query.py:12382 ms1.7%
Collector.deletedjango/db/models/deletion.py:4712 ms1.7%
QuerySet._raw_deletedjango/db/models/query.py:12602 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
claim_partapps/projects/profiles.py:4172 ms1.7%
get_or_create_environmentapps/projects/environments.py:79 obj.save(update_fields=update_fields)2 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11102 ms1.7%
Model._do_updatedjango/db/models/base.py:12112 ms1.7%
QuerySet._updatedjango/db/models/query.py:13272 ms1.7%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms1.7%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
claim_partapps/projects/profiles.py:4852 ms1.7%
Profile.saveapps/projects/models.py:466 super().save(*args, **kwargs)2 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11102 ms1.7%
Model._do_updatedjango/db/models/base.py:12112 ms1.7%
QuerySet._updatedjango/db/models/query.py:13272 ms1.7%
QuerySet.dbdjango/db/models/query.py:18872 ms1.7%
process_profile_partapps/projects/profiles.py:384 write_perfs(profile, part, entries, tests)5 ms5.2%
write_perfsapps/projects/profiles.py:497 TestPerf.objects.bulk_create(3 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.5%
QuerySet.bulk_createdjango/db/models/query.py:8333 ms3.5%
QuerySet._batched_insertdjango/db/models/query.py:19563 ms3.5%
QuerySet._insertdjango/db/models/query.py:19183 ms3.5%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19253 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms1.7%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms1.7%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms1.7%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms1.7%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms1.7%
Dumper.quotepsycopg/adapt.py:592 ms1.7%
ListDumper.dumppsycopg/types/array.py:1842 ms1.7%
ListDumper.dump.<locals>.dump_listpsycopg/types/array.py:1612 ms1.7%
<GC>~2 ms1.7%
write_perfsapps/projects/profiles.py:496 TestPerf.objects.filter(profile=profile, part=part.index).delete()2 ms1.7%
QuerySet.deletedjango/db/models/query.py:12382 ms1.7%
Collector.deletedjango/db/models/deletion.py:4712 ms1.7%
QuerySet._raw_deletedjango/db/models/query.py:12602 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:3833 ms3.5%
upsert_testsapps/projects/profiles.py:4903 ms3.5%
TestManager.upsertapps/projects/models.py:2292 ms1.7%
TestManager.slugs_forapps/projects/models.py:240 existing = dict(self.filter(project_id=project_id, name__in=names).values_list("name", "slug"))2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.filterdjango/db/models/query.py:15422 ms1.7%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms1.7%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms1.7%
Query.add_qdjango/db/models/sql/query.py:16712 ms1.7%
TestManager.upsertapps/projects/models.py:236 return {test.name: test for test in self.filter(project=project, name__in=names)}2 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
process_profile_partapps/projects/profiles.py:374 part = ProfilePart.objects.filter(pk=part.pk).first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profile_partapps/projects/profiles.py:3802 ms1.7%
load_documentapps/projects/profiles.py:1332 ms1.7%
loadsapps/projects/profiles.py:118 document = json.loads(data)2 ms1.7%
loads<stdlib>/json/__init__.py:3712 ms1.7%
JSONDecoder.decode<stdlib>/json/decoder.py:3582 ms1.7%
JSONDecoder.raw_decode<stdlib>/json/decoder.py:3742 ms1.7%
process_profile_partapps/projects/profiles.py:3852 ms1.7%
write_snapshotsapps/projects/profiles.py:352 cursor.executemany(SNAPSHOT_UPSERT, batch)2 ms1.7%
CursorWrapper.executemanydjango/db/backends/utils.py:842 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executemanydjango/db/backends/utils.py:1142 ms1.7%
Cursor.executemanypsycopg/cursor.py:1382 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
BaseCursor._executemany_gen_pipelinepsycopg/_cursor_base.py:2362 ms1.7%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms1.7%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms1.7%
process_profile_partapps/projects/profiles.py:386 ProfilePart.objects.filter(pk=part.pk).update(2 ms1.7%
QuerySet.updatedjango/db/models/query.py:13002 ms1.7%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
process_profileapps/api/tasks.py:237 part = ProfilePart.objects.select_related("profile").get(id=part_id)2 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(8 ms8.7%
Client.postdjango/test/client.py:11538 ms8.7%
RequestFactory.postdjango/test/client.py:4998 ms8.7%
RequestFactory.genericdjango/test/client.py:6718 ms8.7%
Client.requestdjango/test/client.py:10828 ms8.7%
ClientHandler.__call__django/test/client.py:1868 ms8.7%
BaseHandler.get_responsedjango/core/handlers/base.py:1418 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1308 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1238 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:348 ms8.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms8.7%
BaseHandler._get_responsedjango/core/handlers/base.py:1988 ms8.7%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:658 ms8.7%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:378 ms8.7%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:648 ms8.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:75 return view_func(request, *args, **kwargs)5 ms5.2%
profile_uploadapps/api/urls.py:1502 ms1.7%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
profile_uploadapps/api/urls.py:152 part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()2 ms1.7%
QuerySet.firstdjango/db/models/query.py:11452 ms1.7%
QuerySet.__iter__django/db/models/query.py:3902 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:952 ms1.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
profile_uploadapps/api/urls.py:154 part = ProfilePart.objects.create(2 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet.createdjango/db/models/query.py:6692 ms1.7%
Model.savedjango/db/models/base.py:8742 ms1.7%
Model.save_basedjango/db/models/base.py:9662 ms1.7%
Model._save_tabledjango/db/models/base.py:11672 ms1.7%
Model._do_insertdjango/db/models/base.py:12182 ms1.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.7%
QuerySet._insertdjango/db/models/query.py:19182 ms1.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))2 ms1.7%
get_object_or_404django/shortcuts.py:902 ms1.7%
QuerySet.getdjango/db/models/query.py:6352 ms1.7%
QuerySet.__len__django/db/models/query.py:3722 ms1.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms1.7%
ModelIterable.__iter__django/db/models/query.py:1272 ms1.7%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms1.7%
Atomic.__exit__django/db/transaction.py:2472 ms1.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms1.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms1.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms3.5%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms1.7%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms1.7%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms1.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms1.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms1.7%
Cursor.executepsycopg/cursor.py:1132 ms1.7%
Connection.waitpsycopg/connection.py:4952 ms1.7%
Estimated from 58 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/api/tests.py:487
response = self.client.post(
ProfileUploadTest.upload · Libraries
16 ms
apps/api/urls.py:72
project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view · Database
5 ms
apps/projects/profiles.py:497
TestPerf.objects.bulk_create(
write_perfs · Database
5 ms
apps/api/urls.py:73
touch_token(request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view · Database
3 ms
apps/projects/models.py:18
existing = model.objects.filter(project=project, **lookup).first()
get_or_create_numbered · Database
3 ms
apps/projects/models.py:466
super().save(*args, **kwargs)
Profile.save · Database
3 ms
apps/api/urls.py:152
part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()
profile_upload · Database
3 ms
apps/api/urls.py:154
part = ProfilePart.objects.create(
profile_upload · Database
3 ms
apps/api/tasks.py:237
part = ProfilePart.objects.select_related("profile").get(id=part_id)
process_profile · Database
3 ms
apps/projects/profiles.py:374
part = ProfilePart.objects.filter(pk=part.pk).first()
process_profile_part · Database
3 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker 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

95 queries · 27 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

8×
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"."…
5×
SELECT "projects_profile"."id", "projects_profile"."project_id", "projects_profile"."number", "projects_profile"."environment_id", "projects_profile"."session_id", "projects_profile"."run_id", "projects_profile"."commit_id", "projects_profile"."ingest_id", "projects_profile"."external_id", "project…
4×
SELECT "projects_project"."id", "projects_project"."organization_id", "projects_project"."name", "projects_project"."slug", "projects_project"."public", "projects_project"."description", "projects_project"."date_created", "projects_project"."date_updated", "projects_project"."created_by_id" FROM "p…
4×
SELECT "projects_environment"."id", "projects_environment"."project_id", "projects_environment"."name", "projects_environment"."kind", "projects_environment"."provider", "projects_environment"."details", "projects_environment"."date_first_seen", "projects_environment"."date_last_seen" FROM "project…

Biggest pieces of work

call test body
apps/api/tests.py:882
85 ms
call _post_teardown
django/test/testcases.py:1240
3 ms
setup pytest internals 0.60 ms

Reliability

15 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 15 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 89 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 103 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 68 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 122 ms e141198 main Profile
1 month ago CI github-actions:test passed 71 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 114 ms afde85b main Profile
1 month ago CI github-actions:test passed 84 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 135 ms 044719a main Profile
1 month ago CI github-actions:test passed 73 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 118 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 111 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 113 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 127 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 71 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 120 ms 78a4357 main Profile