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

LegacyUrlTest::test_by_public_slug

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
46 ms
median 49 ms
max 78 ms
Phases
Setup 0.70 ms Call 46 ms Teardown 0.19 ms
Categories
Database 17 ms App code 0.86 ms Other (Libraries, Unsampled, Templates, pytest) 28 ms

10 database queries per run

Needs 262 KB of memory (max 560 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
call50 ms98.2%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:393 response = self.client.get(f"/projects/{self.public.slug}/runs/")38 ms75.9%
Client.getdjango/test/client.py:112438 ms75.9%
RequestFactory.getdjango/test/client.py:47538 ms75.9%
RequestFactory.genericdjango/test/client.py:67138 ms75.9%
Client.requestdjango/test/client.py:108238 ms75.9%
ClientHandler.__call__django/test/client.py:17325 ms49.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6225 ms49.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10425 ms49.1%
WhiteNoise.add_fileswhitenoise/base.py:10825 ms49.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12025 ms49.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13125 ms49.1%
WhiteNoise.get_static_filewhitenoise/base.py:20825 ms49.1%
StaticFile.__init__whitenoise/responders.py:7725 ms49.1%
StaticFile.get_alternativeswhitenoise/responders.py:20325 ms49.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:6025 ms49.1%
<GC>~25 ms49.1%
ClientHandler.__call__django/test/client.py:18614 ms26.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14114 ms26.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms26.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13014 ms26.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms26.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30914 ms26.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5514 ms26.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12311 ms22.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms22.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms22.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms22.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms22.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms22.3%
MiddlewareMixin.__call__django/utils/deprecation.py:30911 ms22.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5511 ms22.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:347 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1987 ms13.4%
legacy_redirectapps/projects/urls.py:672 project = Project.objects.select_related("organization").filter(slug=old_slug, public=True).first()7 ms13.4%
QuerySet.filterdjango/db/models/query.py:15422 ms4.5%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms4.5%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms4.5%
Query.add_qdjango/db/models/sql/query.py:16712 ms4.5%
Query._add_qdjango/db/models/sql/query.py:17032 ms4.5%
Query.build_filterdjango/db/models/sql/query.py:15732 ms4.5%
QuerySet.firstdjango/db/models/query.py:11442 ms4.5%
QuerySet.order_bydjango/db/models/query.py:17702 ms4.5%
QuerySet._chaindjango/db/models/query.py:19732 ms4.5%
QuerySet._clonedjango/db/models/query.py:19862 ms4.5%
Query.chaindjango/db/models/sql/query.py:4332 ms4.5%
Query.clonedjango/db/models/sql/query.py:4192 ms4.5%
QuerySet.firstdjango/db/models/query.py:11452 ms4.5%
QuerySet.__iter__django/db/models/query.py:3902 ms4.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.5%
ModelIterable.__iter__django/db/models/query.py:952 ms4.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.5%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms4.5%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:872 ms4.5%
SQLCompiler.get_order_bydjango/db/models/sql/compiler.py:4912 ms4.5%
SQLCompiler._order_by_pairsdjango/db/models/sql/compiler.py:3622 ms4.5%
Expression.__hash__django/db/models/expressions.py:5622 ms4.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3085 ms8.9%
AuthenticationMiddleware.process_requestdjango/contrib/auth/middleware.py:402 ms4.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms4.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms4.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:342 ms4.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms4.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms4.5%
legacy_redirectapps/projects/urls.py:672 project = Project.objects.select_related("organization").filter(slug=old_slug, public=True).first()2 ms4.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.5%
BaseManager.get_querysetdjango/db/models/manager.py:1552 ms4.5%
QuerySet.__init__django/db/models/query.py:2902 ms4.5%
LegacyUrlTest.test_by_public_slugapps/projects/tests.py:3947 ms13.4%
SimpleTestCase.assertRedirectsdjango/test/testcases.py:5017 ms13.4%
Client.getdjango/test/client.py:11247 ms13.4%
RequestFactory.getdjango/test/client.py:4757 ms13.4%
RequestFactory.genericdjango/test/client.py:6717 ms13.4%
Client.requestdjango/test/client.py:10827 ms13.4%
ClientHandler.__call__django/test/client.py:1867 ms13.4%
BaseHandler.get_responsedjango/core/handlers/base.py:1417 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1307 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1237 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:347 ms13.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms13.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1987 ms13.4%
project_runsapps/projects/urls.py:360 run_statistics = runs.aggregate(2 ms4.5%
QuerySet.aggregatedjango/db/models/query.py:5942 ms4.5%
Query.get_aggregationdjango/db/models/sql/query.py:4672 ms4.5%
Count.resolve_expressiondjango/db/models/aggregates.py:2612 ms4.5%
Aggregate.resolve_expressiondjango/db/models/aggregates.py:1222 ms4.5%
BaseExpression.resolve_expressiondjango/db/models/expressions.py:3012 ms4.5%
BaseExpression.resolve_expressiondjango/db/models/expressions.py:3012 ms4.5%
Q.resolve_expressiondjango/db/models/query_utils.py:952 ms4.5%
Query._add_qdjango/db/models/sql/query.py:17032 ms4.5%
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 ms4.5%
QuerySet.__iter__django/db/models/query.py:3902 ms4.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.5%
ModelIterable.__iter__django/db/models/query.py:952 ms4.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.5%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms4.5%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms4.5%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms4.5%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3172 ms4.5%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms4.5%
project_runsapps/projects/urls.py:383 return render(2 ms4.5%
renderdjango/shortcuts.py:252 ms4.5%
render_to_stringdjango/template/loader.py:622 ms4.5%
Template.renderdjango/template/backends/django.py:1072 ms4.5%
Template.renderdjango/template/base.py:1742 ms4.5%
instrumented_test_renderdjango/test/utils.py:1142 ms4.5%
NodeList.renderdjango/template/base.py:10912 ms4.5%
Node.render_annotateddjango/template/base.py:10522 ms4.5%
ExtendsNode.renderdjango/template/loader_tags.py:1602 ms4.5%
instrumented_test_renderdjango/test/utils.py:1142 ms4.5%
NodeList.renderdjango/template/base.py:10912 ms4.5%
Node.render_annotateddjango/template/base.py:10522 ms4.5%
ExtendsNode.renderdjango/template/loader_tags.py:1602 ms4.5%
instrumented_test_renderdjango/test/utils.py:1142 ms4.5%
NodeList.renderdjango/template/base.py:10912 ms4.5%
Node.render_annotateddjango/template/base.py:10522 ms4.5%
BlockNode.renderdjango/template/loader_tags.py:662 ms4.5%
NodeList.renderdjango/template/base.py:10912 ms4.5%
Node.render_annotateddjango/template/base.py:10522 ms4.5%
IncludeNode.renderdjango/template/loader_tags.py:2112 ms4.5%
Template.renderdjango/template/base.py:1762 ms4.5%
instrumented_test_renderdjango/test/utils.py:1132 ms4.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()5 ms8.9%
TestCase._fixture_teardowndjango/test/testcases.py:14955 ms8.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.5%
Cursor.executepsycopg/cursor.py:1132 ms4.5%
Connection.waitpsycopg/connection.py:4952 ms4.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4842 ms4.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.5%
Cursor.executepsycopg/cursor.py:1132 ms4.5%
Connection.waitpsycopg/connection.py:4952 ms4.5%
teardown0.20 ms0.4%
Estimated from 23 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
29 ms
apps/projects/urls.py:672
project = Project.objects.select_related("organization").filter(slug=old_slug, public=True).first()
legacy_redirect · Database
9 ms
apps/projects/urls.py:360
run_statistics = runs.aggregate(
project_runs · Database
2 ms
apps/projects/urls.py:368
page_runs = list(Run.objects.select_related("commit").filter(id__in=[p.id for p in page_obj]).annotate_counts())
project_runs · Database
2 ms
apps/projects/urls.py:383
return render(
project_runs · Templates
2 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_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.03 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
45 ms
call _post_teardown
django/test/testcases.py:1240
5 ms
teardown pytest internals 0.20 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

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