Tests / apps/api/tests.py
IngestEnvironmentTest::test_old_client_locally
First seen 3 weeks ago in 78a4357
CI
github-actions:test
12 runs
Average
52 ms
median 54 ms
max 88 ms
max 88 ms
Phases
Setup 0.70 ms
Call 51 ms
Teardown 0.18 ms
Categories
Database 30 ms
Other (Libraries, Unsampled, pytest) 22 ms
34 database queries per run
Needs 1 KB of memory (max 8 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
call58 ms98.6%
IngestEnvironmentTest.test_old_client_locallyapps/api/tests.py:411 session = self.ingest_start({"env": {}})56 ms95.0%
IngestEnvironmentTest.ingest_startapps/api/tests.py:352 response = self.client.post(56 ms95.0%
Client.postdjango/test/client.py:115356 ms95.0%
RequestFactory.postdjango/test/client.py:49956 ms95.0%
RequestFactory.genericdjango/test/client.py:67156 ms95.0%
Client.requestdjango/test/client.py:108256 ms95.0%
ClientHandler.__call__django/test/client.py:18629 ms49.3%
BaseHandler.get_responsedjango/core/handlers/base.py:14129 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13029 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12329 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30929 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3429 ms49.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5529 ms49.3%
BaseHandler._get_responsedjango/core/handlers/base.py:19829 ms49.3%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6529 ms49.3%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3729 ms49.3%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6429 ms49.3%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7529 ms49.3%
ingest_startapps/api/urls.py:95 "muted_tests": [{"name": test.name} for test in muted_tests],17 ms28.2%
QuerySet.__iter__django/db/models/query.py:39017 ms28.2%
QuerySet._fetch_alldjango/db/models/query.py:200017 ms28.2%
ModelIterable.__iter__django/db/models/query.py:9517 ms28.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162412 ms21.1%
CursorWrapper.executedjango/db/backends/utils.py:7912 ms21.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9212 ms21.1%
CursorWrapper._executedjango/db/backends/utils.py:10512 ms21.1%
Cursor.executepsycopg/cursor.py:11310 ms17.6%
Connection.waitpsycopg/connection.py:49510 ms17.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:20610 ms17.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2868 ms14.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:788 ms14.1%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms3.5%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms3.5%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms3.5%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16114 ms7.0%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7674 ms7.0%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms3.5%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms3.5%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2552 ms3.5%
SQLCompiler.get_default_columnsdjango/db/models/sql/compiler.py:10302 ms3.5%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:882 ms3.5%
WhereNode.split_having_qualifydjango/db/models/sql/where.py:472 ms3.5%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)12 ms21.1%
_SharedTaskProxy.__call__potatoq/app.py:76312 ms21.1%
Task.__call__potatoq/task.py:18912 ms21.1%
process_ingest_startapps/api/tasks.py:774 ms7.0%
get_or_create_numberedapps/projects/models.py:18 existing = model.objects.filter(project=project, **lookup).first()2 ms3.5%
QuerySet.firstdjango/db/models/query.py:11452 ms3.5%
QuerySet.__iter__django/db/models/query.py:3902 ms3.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.5%
ModelIterable.__iter__django/db/models/query.py:952 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
get_or_create_numberedapps/projects/models.py:23 with transaction.atomic():2 ms3.5%
Atomic.__enter__django/db/transaction.py:2112 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms3.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
process_ingest_startapps/api/tasks.py:79 ingest.project,2 ms3.5%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2572 ms3.5%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2222 ms3.5%
QuerySet.getdjango/db/models/query.py:6352 ms3.5%
QuerySet.__len__django/db/models/query.py:3722 ms3.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.5%
ModelIterable.__iter__django/db/models/query.py:952 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
process_ingest_startapps/api/tasks.py:842 ms3.5%
get_or_create_environmentapps/projects/environments.py:63 obj, created = Environment.objects.get_or_create(2 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.5%
QuerySet.get_or_createdjango/db/models/query.py:9922 ms3.5%
Atomic.__enter__django/db/transaction.py:2112 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms3.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
process_ingest_startapps/api/tasks.py:89 Session.objects.get_or_create(2 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.5%
QuerySet.get_or_createdjango/db/models/query.py:9922 ms3.5%
Atomic.__enter__django/db/transaction.py:2112 ms3.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms3.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
process_ingest_startapps/api/tasks.py:104 ingest.date_processed = timezone.now()2 ms3.5%
nowdjango/utils/timezone.py:2042 ms3.5%
ClientHandler.__call__django/test/client.py:17327 ms45.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6227 ms45.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10427 ms45.8%
WhiteNoise.add_fileswhitenoise/base.py:10827 ms45.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12025 ms42.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13125 ms42.2%
WhiteNoise.get_static_filewhitenoise/base.py:20823 ms38.7%
StaticFile.__init__whitenoise/responders.py:778 ms14.1%
StaticFile.get_alternativeswhitenoise/responders.py:2008 ms14.1%
__init____init__:-14 ms7.0%
Headers.__init__<stdlib>/wsgiref/headers.py:432 ms3.5%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms3.5%
Headers.__init__<stdlib>/wsgiref/headers.py:442 ms3.5%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:482 ms3.5%
StaticFile.__init__whitenoise/responders.py:734 ms7.0%
StaticFile.get_headerswhitenoise/responders.py:1814 ms7.0%
StaticFile.__init__whitenoise/responders.py:744 ms7.0%
parsedate<stdlib>/email/_parseaddr.py:1852 ms3.5%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms3.5%
StaticFile.__init__whitenoise/responders.py:764 ms7.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1884 ms7.0%
Headers.__contains__<stdlib>/wsgiref/headers.py:872 ms3.5%
Headers.get<stdlib>/wsgiref/headers.py:1062 ms3.5%
StaticFile.__init__whitenoise/responders.py:752 ms3.5%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms3.5%
Headers.get<stdlib>/wsgiref/headers.py:1042 ms3.5%
WhiteNoise.get_static_filewhitenoise/base.py:2022 ms3.5%
WhiteNoise.add_mime_headerswhitenoise/base.py:2162 ms3.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms3.5%
scantreewhitenoise/base.py:2622 ms3.5%
scantreewhitenoise/base.py:2622 ms3.5%
scantreewhitenoise/base.py:2602 ms3.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms3.5%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms3.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
Estimated from 28 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/api/tests.py:352
response = self.client.post(
IngestEnvironmentTest.ingest_start
· Libraries
|
27 ms |
|
apps/api/urls.py:95
"muted_tests": [{"name": test.name} for test in muted_tests],
ingest_start
· Database
|
17 ms |
|
apps/api/tasks.py:79
ingest.project,
process_ingest_start
· Database
|
2 ms |
|
apps/projects/models.py:18
existing = model.objects.filter(project=project, **lookup).first()
get_or_create_numbered
· Database
|
2 ms |
|
apps/projects/models.py:23
with transaction.atomic():
get_or_create_numbered
· Database
|
2 ms |
|
apps/projects/environments.py:63
obj, created = Environment.objects.get_or_create(
get_or_create_environment
· Database
|
2 ms |
|
apps/api/tasks.py:89
Session.objects.get_or_create(
process_ingest_start
· Database
|
2 ms |
|
apps/api/tasks.py:104
ingest.date_processed = timezone.now()
process_ingest_start
· Libraries
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_clear_site_cache function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
34 queries · 10 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:411
|
56 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
2 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 16 hours ago | CI github-actions:test | passed | 59 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 30 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 53 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 49 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 65 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 31 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 56 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 54 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 54 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 88 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 29 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 53 ms | Profile |