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

McpTest::test_get_insights

First seen 8 hours ago in 78a4357
CI github-actions:test 5 runs
Average
40 ms
median 43 ms
max 49 ms
Phases
Setup 0.74 ms Call 39 ms Teardown 0.17 ms
Categories
Database 12 ms Other (Libraries, Unsampled, pytest) 27 ms

10 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 47 minutes ago · open run
Show pytest frames
call44 ms97.6%
McpTest.test_get_insightsapps/mcp/tests.py:261 result = self.call("get_insights")42 ms93.3%
McpTest.callapps/mcp/tests.py:8142 ms93.3%
McpTest.rpcapps/mcp/tests.py:7442 ms93.3%
McpTest.postapps/mcp/tests.py:66 return self.client.post(42 ms93.3%
Client.postdjango/test/client.py:115342 ms93.3%
RequestFactory.postdjango/test/client.py:49942 ms93.3%
RequestFactory.genericdjango/test/client.py:67142 ms93.3%
Client.requestdjango/test/client.py:108242 ms93.3%
ClientHandler.__call__django/test/client.py:17329 ms63.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6229 ms63.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10429 ms63.6%
WhiteNoise.add_fileswhitenoise/base.py:10829 ms63.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12023 ms50.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13121 ms46.7%
WhiteNoise.get_static_filewhitenoise/base.py:20817 ms38.2%
StaticFile.__init__whitenoise/responders.py:778 ms17.0%
StaticFile.get_alternativeswhitenoise/responders.py:2006 ms12.7%
__init____init__:-14 ms8.5%
StaticFile.get_alternativeswhitenoise/responders.py:2042 ms4.2%
compile<stdlib>/re/__init__.py:2892 ms4.2%
<GC>~2 ms4.2%
StaticFile.__init__whitenoise/responders.py:734 ms8.5%
StaticFile.get_headerswhitenoise/responders.py:1702 ms4.2%
StaticFile.get_headerswhitenoise/responders.py:1782 ms4.2%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.2%
StaticFile.__init__whitenoise/responders.py:742 ms4.2%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.2%
StaticFile.__init__whitenoise/responders.py:762 ms4.2%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms4.2%
StaticFile.__init__whitenoise/responders.py:722 ms4.2%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms4.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms4.2%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms4.2%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms4.2%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms4.2%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms4.2%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1862 ms4.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1156 ms12.7%
scantreewhitenoise/base.py:2624 ms8.5%
scantreewhitenoise/base.py:2624 ms8.5%
scantreewhitenoise/base.py:2622 ms4.2%
scantreewhitenoise/base.py:2622 ms4.2%
scantreewhitenoise/base.py:2622 ms4.2%
scantreewhitenoise/base.py:2602 ms4.2%
scantreewhitenoise/base.py:2642 ms4.2%
ClientHandler.__call__django/test/client.py:18613 ms29.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14113 ms29.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms29.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13013 ms29.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms29.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30913 ms29.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms29.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12313 ms29.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms29.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30913 ms29.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5513 ms29.7%
MiddlewareMixin.__call__django/utils/deprecation.py:30912 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30912 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30912 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30912 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30912 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3412 ms25.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5512 ms25.5%
BaseHandler._get_responsedjango/core/handlers/base.py:19812 ms25.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6512 ms25.5%
mcpapps/mcp/urls.py:1478 ms17.0%
handleapps/mcp/urls.py:1158 ms17.0%
call_toolapps/mcp/urls.py:758 ms17.0%
Tools.callapps/mcp/tools.py:1818 ms17.0%
Tools.get_insightsapps/mcp/tools.py:4538 ms17.0%
fix_nextapps/projects/analytics.py:5448 ms17.0%
latest_profilesapps/projects/analytics.py:264 profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()6 ms12.7%
QuerySet.firstdjango/db/models/query.py:11454 ms8.5%
QuerySet.__iter__django/db/models/query.py:3904 ms8.5%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms8.5%
ModelIterable.__iter__django/db/models/query.py:954 ms8.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms8.5%
CursorWrapper.executedjango/db/backends/utils.py:794 ms8.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms8.5%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms8.5%
Cursor.executepsycopg/cursor.py:1134 ms8.5%
Connection.waitpsycopg/connection.py:4954 ms8.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms4.2%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms4.2%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms4.2%
Scope.profilesapps/projects/analytics.py:175 return Profile.objects.filter(2 ms4.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.2%
QuerySet.filterdjango/db/models/query.py:15422 ms4.2%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms4.2%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms4.2%
latest_profilesapps/projects/analytics.py:2632 ms4.2%
Scope.scoped_environmentsapps/projects/analytics.py:185 return list(Environment.objects.filter(project=self.project))2 ms4.2%
QuerySet.__iter__django/db/models/query.py:3902 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.2%
ModelIterable.__iter__django/db/models/query.py:952 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
mcpapps/mcp/urls.py:1254 ms8.5%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()2 ms4.2%
QuerySet.firstdjango/db/models/query.py:11452 ms4.2%
QuerySet.__iter__django/db/models/query.py:3902 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.2%
ModelIterable.__iter__django/db/models/query.py:952 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
authenticateapps/mcp/urls.py:57 SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())2 ms4.2%
QuerySet.updatedjango/db/models/query.py:13002 ms4.2%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3082 ms4.2%
CommonMiddleware.process_requestdjango/middleware/common.py:482 ms4.2%
HttpRequest.get_hostdjango/http/request.py:1942 ms4.2%
split_domain_portdjango/http/request.py:8192 ms4.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms4.2%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
Estimated from 23 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/mcp/tests.py:66
return self.client.post(
McpTest.post · Libraries
31 ms
apps/projects/analytics.py:264
profile = scope.profiles().filter(environment=environment).order_by("-started_at").first()
latest_profiles · Database
4 ms
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate · Database
2 ms
apps/mcp/urls.py:57
SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())
authenticate · Database
2 ms
apps/projects/analytics.py:185
return list(Environment.objects.filter(project=self.project))
Scope.scoped_environments · Database
2 ms
apps/projects/analytics.py:175
return Profile.objects.filter(
Scope.profiles · Database
2 ms

Fixtures

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

Database

10 queries · 5 ms
No repeated queries.

Biggest pieces of work

call test body
apps/mcp/tests.py:261
42 ms
call _post_teardown
django/test/testcases.py:1240
2 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
47 minutes ago CI github-actions:test passed 45 ms 9caa567 main Profile
an hour ago CI github-actions:test passed 43 ms ec75501 main Profile
7 hours ago CI github-actions:test passed 49 ms d2c12e5 main Profile
8 hours ago CI github-actions:test passed 21 ms 0b902f6 main Profile
8 hours ago CI github-actions:test passed 41 ms 78a4357 main Profile