Tests / apps/api/tests.py
TestInvalidIngest::test_ingest_invalid
First seen 2 years, 11 months ago in 9ff0a7e
CI
github-actions:test
15 runs
Average
89 ms
median 61 ms
max 220 ms
max 220 ms
Phases
Setup 11 ms
Call 78 ms
Teardown 0.17 ms
Categories
Database 27 ms
App code 0.43 ms
Test code 0.17 ms
Other (Libraries, Unsampled, pytest) 61 ms
15 database queries per run
Needs 64 KB of memory (max 260 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup9 ms20.1%
TestCase.setUpClassdjango/test/testcases.py:1423 cls.cls_atomics = cls._enter_atomics()9 ms20.1%
TestCase._enter_atomicsdjango/test/testcases.py:13969 ms20.1%
Atomic.__enter__django/db/transaction.py:1989 ms20.1%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4549 ms20.1%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3039 ms20.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms20.1%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms20.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms20.1%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2567 ms17.6%
DatabaseWrapper.get_new_connectionft/db/postgresql/base.py:39 return super().get_new_connection(conn_params)7 ms17.6%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:267 ms17.6%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3337 ms17.6%
Connection.connectpsycopg/connection.py:1096 ms15.1%
wait_connpsycopg/waiting.py:1414 ms10.1%
EpollSelector.select<stdlib>/selectors.py:4524 ms10.1%
wait_connpsycopg/waiting.py:1452 ms5.0%
BaseConnection._connect_genpsycopg/_connection_base.py:4392 ms5.0%
Connection.connectpsycopg/connection.py:1001 ms2.5%
conninfo_attemptspsycopg/_conninfo_attempts.py:451 ms2.5%
_resolve_hostnamespsycopg/_conninfo_attempts.py:1021 ms2.5%
getaddrinfo<stdlib>/socket.py:9981 ms2.5%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2581 ms2.5%
DatabaseWrapper.init_connection_statedjango/db/backends/postgresql/base.py:4021 ms2.5%
DatabaseWrapper._configure_connectiondjango/db/backends/postgresql/base.py:3741 ms2.5%
DatabaseWrapper._configure_timezonedjango/db/backends/postgresql/base.py:3571 ms2.5%
Cursor.executepsycopg/cursor.py:1131 ms2.5%
Connection.waitpsycopg/connection.py:4951 ms2.5%
call34 ms79.6%
TestInvalidIngest.test_ingest_invalidapps/api/tests.py:58 response = self.client.post(19 ms44.7%
Client.postdjango/test/client.py:115319 ms44.7%
RequestFactory.postdjango/test/client.py:49919 ms44.7%
RequestFactory.genericdjango/test/client.py:67119 ms44.7%
Client.requestdjango/test/client.py:108219 ms44.7%
ClientHandler.__call__django/test/client.py:17317 ms39.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6217 ms39.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10417 ms39.8%
WhiteNoise.add_fileswhitenoise/base.py:10817 ms39.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12013 ms29.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1318 ms19.9%
WhiteNoise.get_static_filewhitenoise/base.py:2088 ms19.9%
StaticFile.__init__whitenoise/responders.py:734 ms9.9%
StaticFile.get_headerswhitenoise/responders.py:1672 ms5.0%
StaticFile.get_headerswhitenoise/responders.py:1762 ms5.0%
formatdate<stdlib>/email/utils.py:2662 ms5.0%
StaticFile.__init__whitenoise/responders.py:722 ms5.0%
StaticFile.get_file_statswhitenoise/responders.py:1632 ms5.0%
StaticFile.__init__whitenoise/responders.py:762 ms5.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms5.0%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms5.0%
Headers.get<stdlib>/wsgiref/headers.py:1062 ms5.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms9.9%
scantreewhitenoise/base.py:2642 ms5.0%
scantreewhitenoise/base.py:2622 ms5.0%
scantreewhitenoise/base.py:2622 ms5.0%
scantreewhitenoise/base.py:2622 ms5.0%
scantreewhitenoise/base.py:2622 ms5.0%
scantreewhitenoise/base.py:2622 ms5.0%
scantreewhitenoise/base.py:2642 ms5.0%
<GC>~2 ms5.0%
ClientHandler.__call__django/test/client.py:1862 ms5.0%
BaseHandler.get_responsedjango/core/handlers/base.py:1412 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1302 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:342 ms5.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.0%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms5.0%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:652 ms5.0%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:372 ms5.0%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:642 ms5.0%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms5.0%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms5.0%
TestInvalidIngest.test_ingest_invalidapps/api/tests.py:5511 ms24.9%
make_projectapps/projects/testing.py:61 organization = Organization.objects.create(4 ms9.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms9.9%
QuerySet.createdjango/db/models/query.py:6592 ms5.0%
cached_property.__get__django/utils/functional.py:472 ms5.0%
Options._reverse_one_to_one_field_namesdjango/db/models/options.py:10302 ms5.0%
cached_property.__get__django/utils/functional.py:472 ms5.0%
Options.related_objectsdjango/db/models/options.py:6212 ms5.0%
Options._get_fieldsdjango/db/models/options.py:9432 ms5.0%
cached_property.__get__django/utils/functional.py:472 ms5.0%
Options._relation_treedjango/db/models/options.py:8432 ms5.0%
Options._populate_directed_relation_graphdjango/db/models/options.py:8102 ms5.0%
Apps.get_modelsdjango/apps/registry.py:1852 ms5.0%
AppConfig.get_modelsdjango/apps/config.py:2582 ms5.0%
QuerySet.createdjango/db/models/query.py:6692 ms5.0%
Model.savedjango/db/models/base.py:8742 ms5.0%
Model.save_basedjango/db/models/base.py:9662 ms5.0%
Model._save_tabledjango/db/models/base.py:11672 ms5.0%
Model._do_insertdjango/db/models/base.py:12182 ms5.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.0%
QuerySet._insertdjango/db/models/query.py:19182 ms5.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
make_projectapps/projects/testing.py:622 ms5.0%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():2 ms5.0%
QuerySet.existsdjango/db/models/query.py:13372 ms5.0%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms5.0%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms5.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
make_projectapps/projects/testing.py:672 ms5.0%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():2 ms5.0%
QuerySet.existsdjango/db/models/query.py:13372 ms5.0%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms5.0%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms5.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
make_projectapps/projects/testing.py:64 project = Project.objects.create(2 ms5.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.0%
QuerySet.createdjango/db/models/query.py:6692 ms5.0%
Model.savedjango/db/models/base.py:8742 ms5.0%
Model.save_basedjango/db/models/base.py:9662 ms5.0%
Model._save_tabledjango/db/models/base.py:11672 ms5.0%
Model._do_insertdjango/db/models/base.py:12182 ms5.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.0%
QuerySet._insertdjango/db/models/query.py:19182 ms5.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms5.0%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms5.0%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms5.0%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms5.0%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms5.0%
TestInvalidIngest.test_ingest_invalidapps/api/tests.py:56 project.secrettokens_set.create(token=secret_token)2 ms5.0%
create_reverse_many_to_one_manager.<locals>.RelatedManager.createdjango/db/models/fields/related_descriptors.py:8332 ms5.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.0%
QuerySet.createdjango/db/models/query.py:6692 ms5.0%
Model.savedjango/db/models/base.py:8742 ms5.0%
Model.save_basedjango/db/models/base.py:9662 ms5.0%
Model._save_tabledjango/db/models/base.py:11672 ms5.0%
Model._do_insertdjango/db/models/base.py:12182 ms5.0%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.0%
QuerySet._insertdjango/db/models/query.py:19182 ms5.0%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms5.0%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms5.0%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms5.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.0%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.0%
Cursor.executepsycopg/cursor.py:1132 ms5.0%
Connection.waitpsycopg/connection.py:4952 ms5.0%
Estimated from 24 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/api/tests.py:58
response = self.client.post(
TestInvalidIngest.test_ingest_invalid
· Libraries
|
17 ms |
|
ft/db/postgresql/base.py:39
return super().get_new_connection(conn_params)
DatabaseWrapper.get_new_connection
· Database
|
7 ms |
|
apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug
· Database
|
4 ms |
|
apps/projects/testing.py:61
organization = Organization.objects.create(
make_project
· Database
|
4 ms |
|
apps/projects/testing.py:64
project = Project.objects.create(
make_project
· Database
|
2 ms |
|
apps/api/tests.py:56
project.secrettokens_set.create(token=secret_token)
TestInvalidIngest.test_ingest_invalid
· Database
|
2 ms |
|
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token
· App code
|
2 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestInvalidIngest class | 8 ms |
| _django_setup_unittest class | 0.22 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _django_set_urlconf function | 0.03 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker 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
15 queries · 6 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:58
|
32 ms |
|
setup setUpClass
django/test/testcases.py:1423
|
9 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
2 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 | 42 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 72 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 35 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 61 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 31 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 54 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 49 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 74 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 34 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 220 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 188 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 212 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 164 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 | 63 ms | Profile |