Tests / apps/api/tests.py
ProfileUploadTest::test_reject_invalid_gzip
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
37 ms
median 39 ms
max 56 ms
max 56 ms
Phases
Setup 0.69 ms
Call 36 ms
Teardown 0.16 ms
Categories
Database 4 ms
App code 0.11 ms
Other (Libraries, Unsampled, pytest, Logging) 32 ms
10 database queries per run
Needs 520 KB of memory (max 828 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call32 ms97.9%
ProfileUploadTest.test_reject_invalid_gzipapps/api/tests.py:605 response = self.upload(b"\x1f\x8bnot really gzip")31 ms92.7%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(31 ms92.7%
Client.postdjango/test/client.py:115331 ms92.7%
RequestFactory.postdjango/test/client.py:49931 ms92.7%
RequestFactory.genericdjango/test/client.py:67131 ms92.7%
Client.requestdjango/test/client.py:108231 ms92.7%
ClientHandler.__call__django/test/client.py:17326 ms77.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6226 ms77.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10426 ms77.3%
WhiteNoise.add_fileswhitenoise/base.py:10826 ms77.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12022 ms67.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13122 ms67.0%
WhiteNoise.get_static_filewhitenoise/base.py:20817 ms51.5%
StaticFile.__init__whitenoise/responders.py:727 ms20.6%
StaticFile.get_file_statswhitenoise/responders.py:1617 ms20.6%
__init____init__:-17 ms20.6%
FileEntry.__init__whitenoise/responders.py:2637 ms20.6%
FileEntry.stat_regular_filewhitenoise/responders.py:2767 ms20.6%
<GC>~7 ms20.6%
StaticFile.__init__whitenoise/responders.py:735 ms15.5%
StaticFile.get_headerswhitenoise/responders.py:1765 ms15.5%
formatdate<stdlib>/email/utils.py:2662 ms5.2%
format_datetime<stdlib>/email/utils.py:2772 ms5.2%
formatdate<stdlib>/email/utils.py:2592 ms5.2%
StaticFile.__init__whitenoise/responders.py:772 ms5.2%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms5.2%
StaticFile.__init__whitenoise/responders.py:762 ms5.2%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms5.2%
WhiteNoise.get_static_filewhitenoise/base.py:2035 ms15.5%
WhiteNoise.add_cache_headerswhitenoise/base.py:2243 ms10.3%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1763 ms10.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1973 ms10.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2272 ms5.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms10.3%
scantreewhitenoise/base.py:2623 ms10.3%
scantreewhitenoise/base.py:2623 ms10.3%
scantreewhitenoise/base.py:2643 ms10.3%
ClientHandler.__call__django/test/client.py:1865 ms15.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1415 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1305 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:345 ms15.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1985 ms15.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:655 ms15.5%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:375 ms15.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:645 ms15.5%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))3 ms10.3%
get_object_or_404django/shortcuts.py:903 ms10.3%
QuerySet.getdjango/db/models/query.py:6252 ms5.2%
QuerySet.filterdjango/db/models/query.py:15422 ms5.2%
QuerySet._filter_or_excludedjango/db/models/query.py:15552 ms5.2%
QuerySet._chaindjango/db/models/query.py:19732 ms5.2%
QuerySet.getdjango/db/models/query.py:6352 ms5.2%
QuerySet.__len__django/db/models/query.py:3722 ms5.2%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.2%
ModelIterable.__iter__django/db/models/query.py:952 ms5.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.2%
Cursor.executepsycopg/cursor.py:1132 ms5.2%
Connection.waitpsycopg/connection.py:4952 ms5.2%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:75 return view_func(request, *args, **kwargs)2 ms5.2%
profile_uploadapps/api/urls.py:1362 ms5.2%
read_uploadapps/projects/profiles.py:66 data = decompressor.decompress(body, MAX_DOCUMENT_SIZE + 1)2 ms5.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms5.2%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms5.2%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms5.2%
Atomic.__exit__django/db/transaction.py:2832 ms5.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.2%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms5.2%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms5.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.2%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.2%
Cursor.executepsycopg/cursor.py:1132 ms5.2%
Connection.waitpsycopg/connection.py:4952 ms5.2%
Estimated from 19 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
|
26 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 |
|
apps/projects/profiles.py:66
data = decompressor.decompress(body, MAX_DOCUMENT_SIZE + 1)
read_upload
· App code
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.03 ms |
| _template_string_if_invalid_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.01 ms |
Database
10 queries · 2 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:605
|
31 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 | 33 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 41 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 20 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 56 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 24 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 44 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 30 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 55 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 23 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 42 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 39 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 39 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 43 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 24 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 41 ms | Profile |