flakytest.dev anze3db flakytest
Tests / apps/projects/tests.py

LegacyUrlTest::test_by_public_slug

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
45 ms
median 49 ms
max 78 ms
Phases
Setup 0.68 ms Call 44 ms Teardown 0.18 ms
Categories
Database 16 ms App code 0.80 ms Other (Libraries, Unsampled, Templates, pytest) 29 ms

10 database queries per run

Needs 212 KB of memory (max 560 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call33 ms97.8%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:393 response = self.client.get(f"/projects/{self.public.slug}/runs/")24 ms72.1%
Client.getdjango/test/client.py:112424 ms72.1%
RequestFactory.getdjango/test/client.py:47524 ms72.1%
RequestFactory.genericdjango/test/client.py:67124 ms72.1%
Client.requestdjango/test/client.py:108222 ms66.9%
ClientHandler.__call__django/test/client.py:17312 ms36.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6212 ms36.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10412 ms36.0%
WhiteNoise.add_fileswhitenoise/base.py:10812 ms36.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12012 ms36.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms36.0%
WhiteNoise.get_static_filewhitenoise/base.py:2089 ms25.7%
StaticFile.__init__whitenoise/responders.py:725 ms15.4%
StaticFile.get_file_statswhitenoise/responders.py:1613 ms10.3%
__init____init__:-12 ms5.1%
FileEntry.__init__whitenoise/responders.py:2602 ms5.1%
<GC>~2 ms5.1%
StaticFile.__init__whitenoise/responders.py:733 ms10.3%
StaticFile.get_headerswhitenoise/responders.py:1782 ms5.1%
parsedate<stdlib>/email/_parseaddr.py:1852 ms5.1%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms5.1%
StaticFile.get_headerswhitenoise/responders.py:1672 ms5.1%
WhiteNoise.get_static_filewhitenoise/base.py:2022 ms5.1%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms5.1%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms5.1%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms5.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms5.1%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms5.1%
ClientHandler.__call__django/test/client.py:18610 ms30.9%
BaseHandler.get_responsedjango/core/handlers/base.py:14110 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13010 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12310 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3410 ms30.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms30.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19810 ms30.9%
legacy_redirectapps/projects/urls.py:672 project = Project.objects.select_related("organization").filter(slug=old_slug, public=True).first()10 ms30.9%
QuerySet.firstdjango/db/models/query.py:114510 ms30.9%
QuerySet.__iter__django/db/models/query.py:39010 ms30.9%
QuerySet._fetch_alldjango/db/models/query.py:200010 ms30.9%
ModelIterable.__iter__django/db/models/query.py:9510 ms30.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162410 ms30.9%
CursorWrapper.executedjango/db/backends/utils.py:7910 ms30.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9210 ms30.9%
CursorWrapper._executedjango/db/backends/utils.py:10510 ms30.9%
Cursor.executepsycopg/cursor.py:11310 ms30.9%
Connection.waitpsycopg/connection.py:49510 ms30.9%
Client.requestdjango/test/client.py:10772 ms5.1%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:3945 ms15.4%
SimpleTestCase.assertRedirectsdjango/test/testcases.py:5015 ms15.4%
Client.getdjango/test/client.py:11245 ms15.4%
RequestFactory.getdjango/test/client.py:4755 ms15.4%
RequestFactory.genericdjango/test/client.py:6715 ms15.4%
Client.requestdjango/test/client.py:10825 ms15.4%
ClientHandler.__call__django/test/client.py:1865 ms15.4%
BaseHandler.get_responsedjango/core/handlers/base.py:1415 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1305 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3095 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:345 ms15.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:555 ms15.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1985 ms15.4%
project_runsapps/projects/urls.py:3462 ms5.1%
find_projectapps/projects/urls.py:49 project = get_object_or_404(2 ms5.1%
get_object_or_404django/shortcuts.py:902 ms5.1%
QuerySet.getdjango/db/models/query.py:6352 ms5.1%
QuerySet.__len__django/db/models/query.py:3722 ms5.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.1%
ModelIterable.__iter__django/db/models/query.py:952 ms5.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.1%
Cursor.executepsycopg/cursor.py:1132 ms5.1%
Connection.waitpsycopg/connection.py:4952 ms5.1%
project_runsapps/projects/urls.py:361 passed_count=Count("id", filter=Q(status=Run.StatusTypes.PASSED)),2 ms5.1%
project_runsapps/projects/urls.py:368 page_runs = list(Run.objects.select_related("commit").filter(id__in=[p.id for p in page_obj]).annotate_counts())2 ms5.1%
RunQueryset.annotate_countsapps/projects/models.py:132 return self.annotate(2 ms5.1%
QuerySet.annotatedjango/db/models/query.py:16992 ms5.1%
QuerySet._annotatedjango/db/models/query.py:17312 ms5.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms10.3%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms5.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.1%
Cursor.executepsycopg/cursor.py:1132 ms5.1%
Connection.waitpsycopg/connection.py:4952 ms5.1%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms5.1%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms5.1%
Atomic.__exit__django/db/transaction.py:2832 ms5.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms5.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms5.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.1%
Cursor.executepsycopg/cursor.py:1132 ms5.1%
Connection.waitpsycopg/connection.py:4952 ms5.1%
Estimated from 19 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:393
response = self.client.get(f"/projects/{self.public.slug}/runs/")
LegacyUrlTest.test_by_public_slug · Libraries
14 ms
apps/projects/urls.py:672
project = Project.objects.select_related("organization").filter(slug=old_slug, public=True).first()
legacy_redirect · Database
10 ms
apps/projects/urls.py:49
project = get_object_or_404(
find_project · Database
2 ms
apps/projects/urls.py:361
passed_count=Count("id", filter=Q(status=Run.StatusTypes.PASSED)),
project_runs · App code
2 ms
apps/projects/models.py:132
return self.annotate(
RunQueryset.annotate_counts · Database
2 ms

Fixtures

Exact setup time
_django_set_urlconf function 0.07 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker function 0.03 ms
_live_server_helper function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

10 queries · 4 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:393
29 ms
call _post_teardown
django/test/testcases.py:1240
3 ms

Reliability

15 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 15 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 33 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 63 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 25 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 50 ms e141198 main Profile
1 month ago CI github-actions:test passed 31 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 53 ms afde85b main Profile
1 month ago CI github-actions:test passed 31 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 60 ms 044719a main Profile
1 month ago CI github-actions:test passed 30 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 51 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 49 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 49 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 49 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 27 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 78 ms 78a4357 main Profile