Tests / apps/api/tests.py
ProfileUploadTest::test_reject_too_large
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
40 ms
median 41 ms
max 78 ms
max 78 ms
Phases
Setup 0.73 ms
Call 39 ms
Teardown 0.16 ms
Categories
Database 3 ms
Test code 0.31 ms
App code 0.19 ms
Other (Libraries, Unsampled, pytest, Serialization, ...) 36 ms
11 database queries per run
Needs 305 KB of memory (max 684 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call29 ms97.8%
ProfileUploadTest.test_reject_too_largeapps/api/tests.py:612 response = self.upload(body)24 ms81.5%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(24 ms81.5%
Client.postdjango/test/client.py:115324 ms81.5%
RequestFactory.postdjango/test/client.py:49924 ms81.5%
RequestFactory.genericdjango/test/client.py:67124 ms81.5%
Client.requestdjango/test/client.py:108224 ms81.5%
ClientHandler.__call__django/test/client.py:17319 ms65.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6219 ms65.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10419 ms65.2%
WhiteNoise.add_fileswhitenoise/base.py:10819 ms65.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11510 ms32.6%
scantreewhitenoise/base.py:2627 ms24.5%
scantreewhitenoise/base.py:2627 ms24.5%
scantreewhitenoise/base.py:2627 ms24.5%
scantreewhitenoise/base.py:2647 ms24.5%
<GC>~7 ms24.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12010 ms32.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13110 ms32.6%
WhiteNoise.get_static_filewhitenoise/base.py:2085 ms16.3%
StaticFile.__init__whitenoise/responders.py:775 ms16.3%
StaticFile.get_alternativeswhitenoise/responders.py:2035 ms16.3%
WhiteNoise.get_static_filewhitenoise/base.py:2022 ms8.2%
WhiteNoise.add_mime_headerswhitenoise/base.py:2212 ms8.2%
WhiteNoise.get_static_filewhitenoise/base.py:1992 ms8.2%
ClientHandler.__call__django/test/client.py:1862 ms8.2%
BaseHandler.get_responsedjango/core/handlers/base.py:1442 ms8.2%
log_responsedjango/utils/log.py:2802 ms8.2%
log_messagedjango/utils/log.py:2492 ms8.2%
Logger.warning<stdlib>/logging/__init__.py:15402 ms8.2%
Logger._log<stdlib>/logging/__init__.py:16732 ms8.2%
Logger.handle<stdlib>/logging/__init__.py:16892 ms8.2%
Logger.callHandlers<stdlib>/logging/__init__.py:17492 ms8.2%
Handler.handle<stdlib>/logging/__init__.py:10302 ms8.2%
StreamHandler.emit<stdlib>/logging/__init__.py:11582 ms8.2%
ProfileUploadTest.test_reject_too_largeapps/api/tests.py:611 with mock.patch("apps.projects.profiles.MAX_DOCUMENT_SIZE", 1000):2 ms8.2%
_patch.__exit__<stdlib>/unittest/mock.py:16642 ms8.2%
ProfileUploadTest.test_reject_too_largeapps/api/tests.py:614 self.assertFalse(Profile.objects.exists())2 ms8.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms8.2%
QuerySet.existsdjango/db/models/query.py:13372 ms8.2%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms8.2%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms8.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms8.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.2%
Cursor.executepsycopg/cursor.py:1132 ms8.2%
Connection.waitpsycopg/connection.py:4952 ms8.2%
Estimated from 12 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
|
24 ms |
|
apps/api/tests.py:611
with mock.patch("apps.projects.profiles.MAX_DOCUMENT_SIZE", 1000):
ProfileUploadTest.test_reject_too_large
· Mocking
|
2 ms |
|
apps/api/tests.py:614
self.assertFalse(Profile.objects.exists())
ProfileUploadTest.test_reject_too_large
· Database
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _live_server_helper function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
11 queries · 2 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:612
|
29 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 | 30 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 | 21 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 37 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 22 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 41 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 35 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 60 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 29 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 78 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 | 41 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 57 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 26 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 41 ms | Profile |