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

ProfileUploadTest::test_reupload_split_differently

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
244 ms
median 239 ms
max 344 ms
Phases
Setup 0.67 ms Call 243 ms Teardown 0.19 ms
Categories
Database 170 ms App code 3 ms Test code 0.30 ms Other (Libraries, Serialization, Unsampled, Mocking, ...) 72 ms

210 database queries per run

Needs 274 KB of memory (max 468 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
call279 ms99.7%
ProfileUploadTest.test_reupload_split_differentlyapps/api/tests.py:797 self.upload(part)219 ms78.5%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(160 ms57.3%
Client.postdjango/test/client.py:1153160 ms57.3%
RequestFactory.postdjango/test/client.py:499160 ms57.3%
RequestFactory.genericdjango/test/client.py:671160 ms57.3%
Client.requestdjango/test/client.py:1082160 ms57.3%
ClientHandler.__call__django/test/client.py:173127 ms45.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:62125 ms44.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:104125 ms44.8%
WhiteNoise.add_fileswhitenoise/base.py:108125 ms44.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:120125 ms44.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:131125 ms44.8%
WhiteNoise.get_static_filewhitenoise/base.py:208121 ms43.4%
StaticFile.__init__whitenoise/responders.py:72116 ms41.4%
StaticFile.get_file_statswhitenoise/responders.py:163116 ms41.4%
<GC>~116 ms41.4%
StaticFile.__init__whitenoise/responders.py:743 ms1.0%
Headers.__getitem__<stdlib>/wsgiref/headers.py:833 ms1.0%
StaticFile.__init__whitenoise/responders.py:773 ms1.0%
WhiteNoise.get_static_filewhitenoise/base.py:2033 ms1.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2243 ms1.0%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms1.0%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms1.0%
URLMixin.urldebug_toolbar/panels/staticfiles.py:203 ms1.0%
1 smaller frames hidden
1 smaller frames hidden
ClientHandler.__call__django/test/client.py:18632 ms11.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14132 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13032 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12332 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30932 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3432 ms11.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5532 ms11.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19832 ms11.6%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6532 ms11.6%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3732 ms11.6%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6432 ms11.6%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7526 ms9.2%
profile_uploadapps/api/urls.py:15013 ms4.8%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()12 ms4.3%
QuerySet.firstdjango/db/models/query.py:11458 ms2.9%
QuerySet.__iter__django/db/models/query.py:3908 ms2.9%
QuerySet._fetch_alldjango/db/models/query.py:20008 ms2.9%
ModelIterable.__iter__django/db/models/query.py:958 ms2.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16115 ms1.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7675 ms1.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:864 ms1.4%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:754 ms1.4%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3173 ms1.0%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms1.0%
Col.as_sqldjango/db/models/expressions.py:13233 ms1.0%
1 smaller frames hidden
1 smaller frames hidden
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet.filterdjango/db/models/query.py:15423 ms1.0%
QuerySet._filter_or_excludedjango/db/models/query.py:15603 ms1.0%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15703 ms1.0%
Query.add_qdjango/db/models/sql/query.py:16713 ms1.0%
1 smaller frames hidden
1 smaller frames hidden
profile_uploadapps/api/urls.py:152 part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()4 ms1.4%
QuerySet.firstdjango/db/models/query.py:11454 ms1.4%
QuerySet.__iter__django/db/models/query.py:3904 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
ModelIterable.__iter__django/db/models/query.py:954 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
1 smaller frames hidden
profile_uploadapps/api/urls.py:1373 ms1.0%
parse_documentapps/projects/profiles.py:803 ms1.0%
loadsapps/projects/profiles.py:118 document = json.loads(data)3 ms1.0%
profile_uploadapps/api/urls.py:154 part = ProfilePart.objects.create(3 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet.createdjango/db/models/query.py:6693 ms1.0%
Model.savedjango/db/models/base.py:8743 ms1.0%
Model.save_basedjango/db/models/base.py:9663 ms1.0%
Model._save_tabledjango/db/models/base.py:11673 ms1.0%
Model._do_insertdjango/db/models/base.py:12183 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet._insertdjango/db/models/query.py:19183 ms1.0%
profile_uploadapps/api/urls.py:1633 ms1.0%
Project.urlapps/projects/models.py:59 return reverse(name, args=[self.organization.slug, self.slug, *args])3 ms1.0%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2573 ms1.0%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2223 ms1.0%
QuerySet.getdjango/db/models/query.py:6353 ms1.0%
QuerySet.__len__django/db/models/query.py:3723 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))5 ms1.9%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)3 ms1.0%
2 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
ProfileUploadTest.uploadapps/api/tests.py:49559 ms21.2%
_SharedTaskProxy.__call__potatoq/app.py:76359 ms21.2%
Task.__call__potatoq/task.py:18959 ms21.2%
process_profileapps/api/tasks.py:23938 ms13.5%
process_profile_partapps/projects/profiles.py:363 profile = claim_part(part, document)18 ms6.3%
claim_partapps/projects/profiles.py:404 commit, _ = Commit.objects.get_or_create(5 ms1.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms1.9%
QuerySet.get_or_createdjango/db/models/query.py:9874 ms1.4%
QuerySet.getdjango/db/models/query.py:6354 ms1.4%
QuerySet.__len__django/db/models/query.py:3724 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
ModelIterable.__iter__django/db/models/query.py:954 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:794 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
1 smaller frames hidden
claim_partapps/projects/profiles.py:4673 ms1.0%
Profile.saveapps/projects/models.py:466 super().save(*args, **kwargs)3 ms1.0%
Model.savedjango/db/models/base.py:8743 ms1.0%
Model.save_basedjango/db/models/base.py:9663 ms1.0%
Model._save_tabledjango/db/models/base.py:11103 ms1.0%
Model._do_updatedjango/db/models/base.py:12113 ms1.0%
QuerySet._updatedjango/db/models/query.py:13273 ms1.0%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21403 ms1.0%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21113 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
claim_partapps/projects/profiles.py:3993 ms1.0%
claim_partapps/projects/profiles.py:379 profile = Profile.objects.select_for_update(no_key=True).get(pk=part.profile_id)3 ms1.0%
QuerySet.getdjango/db/models/query.py:6353 ms1.0%
QuerySet.__len__django/db/models/query.py:3723 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
3 smaller frames hidden
process_profile_partapps/projects/profiles.py:3657 ms2.4%
upsert_testsapps/projects/profiles.py:4727 ms2.4%
TestManager.upsertapps/projects/models.py:2294 ms1.4%
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))3 ms1.0%
QuerySet.__iter__django/db/models/query.py:3903 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
FlatValuesListIterable.__iter__django/db/models/query.py:2773 ms1.0%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15733 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
1 smaller frames hidden
2 smaller frames hidden
process_profile_partapps/projects/profiles.py:3664 ms1.4%
write_perfsapps/projects/profiles.py:478 TestPerf.objects.filter(profile=profile, part=part.index).delete()3 ms1.0%
QuerySet.deletedjango/db/models/query.py:12383 ms1.0%
Collector.deletedjango/db/models/deletion.py:4713 ms1.0%
QuerySet._raw_deletedjango/db/models/query.py:12603 ms1.0%
1 smaller frames hidden
process_profile_partapps/projects/profiles.py:3673 ms1.0%
write_snapshotsapps/projects/profiles.py:334 cursor.executemany(SNAPSHOT_UPSERT, batch)3 ms1.0%
CursorWrapper.executemanydjango/db/backends/utils.py:843 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executemanydjango/db/backends/utils.py:1143 ms1.0%
Cursor.executemanypsycopg/cursor.py:1373 ms1.0%
Connection._pipeline_nolockpsycopg/connection.py:4723 ms1.0%
Pipeline.__exit__psycopg/_pipeline.py:733 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
process_profile_partapps/projects/profiles.py:356 part = ProfilePart.objects.filter(pk=part.pk).first()3 ms1.0%
QuerySet.firstdjango/db/models/query.py:11453 ms1.0%
QuerySet.__iter__django/db/models/query.py:3903 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
process_profile_partapps/projects/profiles.py:359 or ProfilePart.objects.filter(profile_id=part.profile_id, index=part.index, id__gt=part.id).exists()3 ms1.0%
QuerySet.existsdjango/db/models/query.py:13373 ms1.0%
Query.has_resultsdjango/db/models/sql/query.py:6813 ms1.0%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15923 ms1.0%
1 smaller frames hidden
process_profileapps/api/tasks.py:25318 ms6.3%
_SharedTaskProxy.__call__potatoq/app.py:76318 ms6.3%
Task.__call__potatoq/task.py:18918 ms6.3%
finalize_profile_partsapps/api/tasks.py:25916 ms5.8%
finalize_profileapps/projects/profiles.py:500 profile = Profile.objects.select_for_update(no_key=True).get(pk=profile_id)5 ms1.9%
QuerySet.getdjango/db/models/query.py:6354 ms1.4%
QuerySet.__len__django/db/models/query.py:3724 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
1 smaller frames hidden
finalize_profileapps/projects/profiles.py:504 for part in ProfilePart.objects.filter(profile=profile).defer("document").order_by("index", "id"):4 ms1.4%
QuerySet.__iter__django/db/models/query.py:3904 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
finalize_profileapps/projects/profiles.py:5173 ms1.0%
add_perfsapps/projects/rollups.py:88 TestDailyStats.objects.bulk_create(3 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet.bulk_createdjango/db/models/query.py:8083 ms1.0%
3 smaller frames hidden
1 smaller frames hidden
process_profileapps/api/tasks.py:237 part = ProfilePart.objects.select_related("profile").get(id=part_id)4 ms1.4%
QuerySet.getdjango/db/models/query.py:6354 ms1.4%
QuerySet.__len__django/db/models/query.py:3724 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms1.4%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
1 smaller frames hidden
ProfileUploadTest.test_reupload_split_differentlyapps/api/tests.py:80044 ms15.9%
ProfileUploadTest.uploadapps/api/tests.py:49530 ms10.6%
_SharedTaskProxy.__call__potatoq/app.py:76330 ms10.6%
Task.__call__potatoq/task.py:18930 ms10.6%
process_profileapps/api/tasks.py:23927 ms9.6%
process_profile_partapps/projects/profiles.py:363 profile = claim_part(part, document)13 ms4.8%
claim_partapps/projects/profiles.py:3844 ms1.4%
7 smaller frames hidden
process_profile_partapps/projects/profiles.py:3665 ms1.9%
write_perfsapps/projects/profiles.py:479 TestPerf.objects.bulk_create(3 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet.bulk_createdjango/db/models/query.py:8333 ms1.0%
QuerySet._batched_insertdjango/db/models/query.py:19563 ms1.0%
QuerySet._insertdjango/db/models/query.py:19183 ms1.0%
2 smaller frames hidden
process_profile_partapps/projects/profiles.py:3673 ms1.0%
write_snapshotsapps/projects/profiles.py:334 cursor.executemany(SNAPSHOT_UPSERT, batch)3 ms1.0%
CursorWrapper.executemanydjango/db/backends/utils.py:843 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executemanydjango/db/backends/utils.py:1143 ms1.0%
4 smaller frames hidden
process_profileapps/api/tasks.py:237 part = ProfilePart.objects.select_related("profile").get(id=part_id)3 ms1.0%
QuerySet.getdjango/db/models/query.py:6353 ms1.0%
QuerySet.__len__django/db/models/query.py:3723 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(15 ms5.3%
Client.postdjango/test/client.py:115315 ms5.3%
RequestFactory.postdjango/test/client.py:49915 ms5.3%
RequestFactory.genericdjango/test/client.py:67115 ms5.3%
Client.requestdjango/test/client.py:108215 ms5.3%
ClientHandler.__call__django/test/client.py:18615 ms5.3%
BaseHandler.get_responsedjango/core/handlers/base.py:14115 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13015 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12315 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30915 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3415 ms5.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5515 ms5.3%
BaseHandler._get_responsedjango/core/handlers/base.py:19815 ms5.3%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6515 ms5.3%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3715 ms5.3%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6415 ms5.3%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:759 ms3.4%
profile_uploadapps/api/urls.py:1504 ms1.4%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()4 ms1.4%
QuerySet.firstdjango/db/models/query.py:11453 ms1.0%
QuerySet.__iter__django/db/models/query.py:3903 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
1 smaller frames hidden
profile_uploadapps/api/urls.py:152 part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()3 ms1.0%
QuerySet.firstdjango/db/models/query.py:11453 ms1.0%
QuerySet.__iter__django/db/models/query.py:3903 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
profile_uploadapps/api/urls.py:154 part = ProfilePart.objects.create(3 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet.createdjango/db/models/query.py:6693 ms1.0%
Model.savedjango/db/models/base.py:8743 ms1.0%
Model.save_basedjango/db/models/base.py:9663 ms1.0%
Model._save_tabledjango/db/models/base.py:11673 ms1.0%
Model._do_insertdjango/db/models/base.py:12183 ms1.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms1.0%
QuerySet._insertdjango/db/models/query.py:19183 ms1.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19253 ms1.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms1.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms1.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms1.0%
Cursor.executepsycopg/cursor.py:1133 ms1.0%
Connection.waitpsycopg/connection.py:4953 ms1.0%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))3 ms1.0%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)3 ms1.0%
QuerySet.__iter__django/db/models/query.py:3903 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms1.0%
get_object_or_404django/shortcuts.py:903 ms1.0%
QuerySet.getdjango/db/models/query.py:6353 ms1.0%
QuerySet.__len__django/db/models/query.py:3723 ms1.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms1.0%
ModelIterable.__iter__django/db/models/query.py:953 ms1.0%
ProfileUploadTest.test_reupload_split_differentlyapps/api/tests.py:8029 ms3.4%
_SharedTaskProxy.__call__potatoq/app.py:7639 ms3.4%
Task.__call__potatoq/task.py:1899 ms3.4%
finalize_profile_partsapps/api/tasks.py:2598 ms2.9%
finalize_profileapps/projects/profiles.py:5173 ms1.0%
4 smaller frames hidden
1 smaller frames hidden
4 smaller frames hidden
teardown0.18 ms0.1%
Estimated from 208 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
128 ms
apps/projects/models.py:18
existing = model.objects.filter(project=project, **lookup).first()
get_or_create_numbered · Database
16 ms
apps/projects/profiles.py:404
commit, _ = Commit.objects.get_or_create(
claim_part · Database
7 ms
apps/api/urls.py:152
part = ProfilePart.objects.filter(profile=profile, index=index).order_by("-id").first()
profile_upload · Database
7 ms
apps/api/tasks.py:237
part = ProfilePart.objects.select_related("profile").get(id=part_id)
process_profile · Database
7 ms
apps/projects/profiles.py:500
profile = Profile.objects.select_for_update(no_key=True).get(pk=profile_id)
finalize_profile · Database
7 ms
apps/projects/profiles.py:334
cursor.executemany(SNAPSHOT_UPSERT, batch)
write_snapshots · Database
5 ms
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token · Database
5 ms
apps/api/urls.py:154
part = ProfilePart.objects.create(
profile_upload · Database
5 ms
apps/projects/profiles.py:356
part = ProfilePart.objects.filter(pk=part.pk).first()
process_profile_part · Database
4 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.04 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

210 queries · 71 ms

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

19×
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"."…
16×
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…
10×
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…
8×
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…
5×
SELECT "projects_secrettokens"."id" AS "pk" FROM "projects_secrettokens" WHERE (("projects_secrettokens"."date_last_used" < %s OR "projects_secrettokens"."date_last_used" IS NULL) AND "projects_secrettokens"."token" = %s) FOR UPDATE SKIP LOCKED

Biggest pieces of work

call test body
apps/api/tests.py:797
279 ms
teardown pytest internals 0.18 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 279 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 214 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 304 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 286 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 344 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 268 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 226 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 210 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 206 ms ec75501 main Profile
2 weeks, 6 days ago CI github-actions:test passed 251 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 119 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 220 ms 78a4357 main Profile