Tests / apps/api/tests.py
ProfileUploadTest::test_reject_other_formats
First seen 7 hours ago in 78a4357
CI
github-actions:test
5 runs
Average
38 ms
median 38 ms
max 51 ms
max 51 ms
Phases
Setup 0.74 ms
Call 37 ms
Teardown 0.17 ms
Categories
Database 7 ms
Test code 1 ms
Other (Libraries, Unsampled, Logging) 30 ms
11 database queries per run
Needs 454 KB of memory (max 860 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 18 minutes ago ·
open run
call39 ms97.4%
ProfileUploadTest.test_reject_other_formatsapps/api/tests.py:590 response = self.upload({"format": "something-else", "run": {}})33 ms83.5%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(33 ms83.5%
Client.postdjango/test/client.py:115333 ms83.5%
RequestFactory.postdjango/test/client.py:49933 ms83.5%
RequestFactory.genericdjango/test/client.py:67133 ms83.5%
Client.requestdjango/test/client.py:108233 ms83.5%
ClientHandler.__call__django/test/client.py:17325 ms62.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6225 ms62.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10425 ms62.6%
WhiteNoise.add_fileswhitenoise/base.py:10825 ms62.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12017 ms41.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13117 ms41.8%
WhiteNoise.get_static_filewhitenoise/base.py:20811 ms27.8%
StaticFile.__init__whitenoise/responders.py:766 ms13.9%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1883 ms7.0%
StaticFile.__init__whitenoise/responders.py:773 ms7.0%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms7.0%
StaticFile.__init__whitenoise/responders.py:743 ms7.0%
parsedate<stdlib>/email/_parseaddr.py:1853 ms7.0%
WhiteNoise.get_static_filewhitenoise/base.py:2033 ms7.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2243 ms7.0%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms7.0%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms7.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1158 ms20.9%
scantreewhitenoise/base.py:2628 ms20.9%
scantreewhitenoise/base.py:2626 ms13.9%
scantreewhitenoise/base.py:2646 ms13.9%
ClientHandler.__call__django/test/client.py:1866 ms13.9%
BaseHandler.get_responsedjango/core/handlers/base.py:1413 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1303 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1233 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:343 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms7.0%
BaseHandler._get_responsedjango/core/handlers/base.py:1983 ms7.0%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:653 ms7.0%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:373 ms7.0%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:643 ms7.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 ms7.0%
get_object_or_404django/shortcuts.py:903 ms7.0%
QuerySet.getdjango/db/models/query.py:6353 ms7.0%
QuerySet.__len__django/db/models/query.py:3723 ms7.0%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms7.0%
ModelIterable.__iter__django/db/models/query.py:953 ms7.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms7.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.0%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms7.0%
Cursor.executepsycopg/cursor.py:1133 ms7.0%
Connection.waitpsycopg/connection.py:4953 ms7.0%
BaseHandler.get_responsedjango/core/handlers/base.py:1443 ms7.0%
log_responsedjango/utils/log.py:2803 ms7.0%
log_messagedjango/utils/log.py:2493 ms7.0%
Logger.warning<stdlib>/logging/__init__.py:15353 ms7.0%
Logger._log<stdlib>/logging/__init__.py:16683 ms7.0%
Logger.handle<stdlib>/logging/__init__.py:16843 ms7.0%
Logger.callHandlers<stdlib>/logging/__init__.py:17443 ms7.0%
Handler.handle<stdlib>/logging/__init__.py:10303 ms7.0%
StreamHandler.emit<stdlib>/logging/__init__.py:11573 ms7.0%
ClientHandler.__call__django/test/client.py:1763 ms7.0%
Signal.senddjango/dispatch/dispatcher.py:2073 ms7.0%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()3 ms7.0%
TestCase._fixture_setupdjango/test/testcases.py:14783 ms7.0%
TestCase._enter_atomicsdjango/test/testcases.py:13963 ms7.0%
Atomic.__enter__django/db/transaction.py:2113 ms7.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms7.0%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms7.0%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms7.0%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.0%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms7.0%
Cursor.executepsycopg/cursor.py:1133 ms7.0%
Connection.waitpsycopg/connection.py:4953 ms7.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms7.0%
TestCase._fixture_teardowndjango/test/testcases.py:14943 ms7.0%
TestCase._should_check_constraintsdjango/test/testcases.py:15033 ms7.0%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4923 ms7.0%
Cursor.executepsycopg/cursor.py:1133 ms7.0%
Connection.waitpsycopg/connection.py:4953 ms7.0%
Estimated from 14 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
|
30 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
|
3 ms |
Fixtures
Exact setup time| _live_server_helper function | 0.07 ms |
| _template_string_if_invalid_marker function | 0.06 ms |
| _django_db_marker function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _django_clear_site_cache function | 0.04 ms |
| monkeypatch function | 0.03 ms |
Database
11 queries · 3 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:590
|
33 ms |
|
call _pre_setup
django/test/testcases.py:1164
|
3 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
3 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 18 minutes ago | CI github-actions:test | passed | 40 ms | Profile |
| 43 minutes ago | CI github-actions:test | passed | 38 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 51 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 24 ms | Profile |
| 7 hours ago | CI github-actions:test | passed | 38 ms | Profile |