Tests / confs/tests.py
TestApproveConference::test_non_staff_forbidden
First seen 3 weeks ago in 0c23747
CI
github-actions:test
11 runs
Average
1.30 s
median 1.30 s
max 2.23 s
max 2.23 s
Phases
Setup 2 ms
Call 1.30 s
Teardown 0.43 ms
Categories
Password hashing 1.19 s
Database 27 ms
Factories 2 ms
App code 0.09 ms
Other (Libraries, pytest, Unsampled, Logging) 88 ms
26 database queries per run
Needs 83 KB of memory (max 724 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
call1.30 s99.9%
TestApproveConference.setUpconfs/tests.py:1371 self.staff = User.objects.create_user("staff", password="pw", is_staff=True)635 ms48.9%
UserManager.create_userdjango/contrib/auth/models.py:180635 ms48.9%
UserManager._create_userdjango/contrib/auth/models.py:167635 ms48.9%
UserManager._create_user_objectdjango/contrib/auth/models.py:160635 ms48.9%
make_passworddjango/contrib/auth/hashers.py:118635 ms48.9%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333635 ms48.9%
pbkdf2django/utils/crypto.py:93635 ms48.9%
TestApproveConference.setUpconfs/tests.py:1372 self.normal = User.objects.create_user("bob", password="pw")488 ms37.6%
UserManager.create_userdjango/contrib/auth/models.py:180488 ms37.6%
UserManager._create_userdjango/contrib/auth/models.py:167484 ms37.3%
UserManager._create_user_objectdjango/contrib/auth/models.py:160484 ms37.3%
make_passworddjango/contrib/auth/hashers.py:118484 ms37.3%
PBKDF2PasswordHasher.encodedjango/contrib/auth/hashers.py:333484 ms37.3%
pbkdf2django/utils/crypto.py:93484 ms37.3%
1 smaller frames hidden
TestApproveConference.test_non_staff_forbiddenconfs/tests.py:1377 response = self.client.post(self.url)154 ms11.8%
Client.postdjango/test/client.py:1162154 ms11.8%
RequestFactory.postdjango/test/client.py:499154 ms11.8%
RequestFactory.genericdjango/test/client.py:671154 ms11.8%
Client.requestdjango/test/client.py:1091154 ms11.8%
ClientHandler.__call__django/test/client.py:173148 ms11.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:63147 ms11.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:104145 ms11.1%
WhiteNoise.add_fileswhitenoise/base.py:108145 ms11.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:120137 ms10.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:131136 ms10.4%
WhiteNoise.get_static_filewhitenoise/base.py:217106 ms8.1%
StaticFile.__init__whitenoise/responders.py:7765 ms5.0%
StaticFile.get_alternativeswhitenoise/responders.py:20633 ms2.5%
StaticFile.get_alternativeswhitenoise/responders.py:20124 ms1.8%
Headers.__setitem__<stdlib>/wsgiref/headers.py:6224 ms1.8%
Headers.__delitem__<stdlib>/wsgiref/headers.py:7124 ms1.8%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:5022 ms1.7%
StaticFile.get_alternativeswhitenoise/responders.py:1987 ms0.5%
1 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:7322 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1769 ms0.7%
formatdate<stdlib>/email/utils.py:2667 ms0.5%
2 smaller frames hidden
StaticFile.get_headerswhitenoise/responders.py:1788 ms0.6%
parsedate<stdlib>/email/_parseaddr.py:1857 ms0.5%
parsedate_tz<stdlib>/email/_parseaddr.py:507 ms0.5%
3 smaller frames hidden
StaticFile.__init__whitenoise/responders.py:7613 ms1.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1887 ms0.5%
Headers.__contains__<stdlib>/wsgiref/headers.py:877 ms0.5%
2 smaller frames hidden
2 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:21216 ms1.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:23315 ms1.2%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:17615 ms1.2%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:19715 ms1.2%
URLMixin.urldebug_toolbar/panels/staticfiles.py:209 ms0.7%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2358 ms0.6%
4 smaller frames hidden
1 smaller frames hidden
WhiteNoise.get_static_filewhitenoise/base.py:21113 ms1.0%
WhiteNoise.add_mime_headerswhitenoise/base.py:22510 ms0.8%
MediaTypes.get_typewhitenoise/media_types.py:157 ms0.5%
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
2 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
1 smaller frames hidden
TestApproveConference.test_non_staff_forbiddenconfs/tests.py:1376 self.client.force_login(self.normal)12 ms0.9%
ClientMixin.force_logindjango/test/client.py:85812 ms0.9%
2 smaller frames hidden
Estimated from 1,301 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
confs/tests.py:1371
self.staff = User.objects.create_user("staff", password="pw", is_staff=True)
TestApproveConference.setUp
· Password hashing
|
635 ms |
|
confs/tests.py:1372
self.normal = User.objects.create_user("bob", password="pw")
TestApproveConference.setUp
· Password hashing
|
488 ms |
|
confs/tests.py:1377
response = self.client.post(self.url)
TestApproveConference.test_non_staff_forbidden
· Libraries
|
154 ms |
|
confs/tests.py:1376
self.client.force_login(self.normal)
TestApproveConference.test_non_staff_forbidden
· Database
|
12 ms |
|
confs/tests.py:1379
self.conference.refresh_from_db()
TestApproveConference.test_non_staff_forbidden
· Database
|
5 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.06 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.05 ms |
| _django_isolate_apps function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _live_server_helper function | 0.05 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.03 ms |
Database
26 queries · 22 msNo repeated queries.
Biggest pieces of work
|
call setUp
confs/tests.py:1371
|
1.12 s |
|
call test body
confs/tests.py:1377
|
170 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
3 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 | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 1.30 s | Profile |
| 16 hours ago | CI github-actions:test | passed | 690 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 1.34 s | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 1.38 s | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 856 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 1.06 s | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 969 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 790 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 1.73 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 2.02 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 2.23 s | Profile |
| 3 weeks ago | CI github-actions:test | passed | 968 ms | Run |