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

McpTest::test_get_insights

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
40 ms
median 43 ms
max 63 ms
Phases
Setup 0.64 ms Call 39 ms Teardown 0.16 ms
Categories
Database 16 ms App code 0.11 ms Other (Libraries, Unsampled, Cache, pytest) 24 ms

10 database queries per run

Needs 81 KB of memory (max 460 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call33 ms98.0%
McpTest.test_get_insightsapps/mcp/tests.py:262 result = self.call("get_insights")28 ms82.9%
McpTest.callapps/mcp/tests.py:8228 ms82.9%
McpTest.rpcapps/mcp/tests.py:7528 ms82.9%
McpTest.postapps/mcp/tests.py:67 return self.client.post(28 ms82.9%
Client.postdjango/test/client.py:115328 ms82.9%
RequestFactory.postdjango/test/client.py:49928 ms82.9%
RequestFactory.genericdjango/test/client.py:67128 ms82.9%
Client.requestdjango/test/client.py:108228 ms82.9%
ClientHandler.__call__django/test/client.py:17318 ms52.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6218 ms52.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10418 ms52.8%
WhiteNoise.add_fileswhitenoise/base.py:10818 ms52.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12015 ms45.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13113 ms37.7%
WhiteNoise.get_static_filewhitenoise/base.py:20813 ms37.7%
StaticFile.__init__whitenoise/responders.py:7710 ms30.1%
StaticFile.get_alternativeswhitenoise/responders.py:1988 ms22.6%
StaticFile.get_alternatives.<locals>.<lambda>whitenoise/responders.py:1988 ms22.6%
<GC>~8 ms22.6%
StaticFile.get_alternativeswhitenoise/responders.py:2033 ms7.5%
StaticFile.__init__whitenoise/responders.py:733 ms7.5%
StaticFile.get_headerswhitenoise/responders.py:1703 ms7.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms7.5%
scantreewhitenoise/base.py:2623 ms7.5%
scantreewhitenoise/base.py:2623 ms7.5%
scantreewhitenoise/base.py:2623 ms7.5%
scantreewhitenoise/base.py:2623 ms7.5%
scantreewhitenoise/base.py:2643 ms7.5%
ClientHandler.__call__django/test/client.py:1868 ms22.6%
BaseHandler.get_responsedjango/core/handlers/base.py:1418 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1308 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1238 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3098 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:348 ms22.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:558 ms22.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1988 ms22.6%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:658 ms22.6%
mcpapps/mcp/urls.py:1255 ms15.1%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()3 ms7.5%
QuerySet.firstdjango/db/models/query.py:11453 ms7.5%
QuerySet.__iter__django/db/models/query.py:3903 ms7.5%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms7.5%
ModelIterable.__iter__django/db/models/query.py:953 ms7.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms7.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.5%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms7.5%
Cursor.executepsycopg/cursor.py:1133 ms7.5%
Connection.waitpsycopg/connection.py:4953 ms7.5%
authenticateapps/mcp/urls.py:57 SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())3 ms7.5%
QuerySet.updatedjango/db/models/query.py:13003 ms7.5%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21113 ms7.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms7.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.5%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms7.5%
Cursor.executepsycopg/cursor.py:1133 ms7.5%
Connection.waitpsycopg/connection.py:4953 ms7.5%
mcpapps/mcp/urls.py:1473 ms7.5%
handleapps/mcp/urls.py:1153 ms7.5%
call_toolapps/mcp/urls.py:753 ms7.5%
Tools.callapps/mcp/tools.py:1883 ms7.5%
Tools.get_insightsapps/mcp/tools.py:4623 ms7.5%
fix_nextapps/projects/analytics.py:5443 ms7.5%
latest_profilesapps/projects/analytics.py:2633 ms7.5%
Scope.scoped_environmentsapps/projects/analytics.py:185 return list(Environment.objects.filter(project=self.project))3 ms7.5%
QuerySet.__iter__django/db/models/query.py:3903 ms7.5%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms7.5%
ModelIterable.__iter__django/db/models/query.py:953 ms7.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms7.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.5%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms7.5%
Cursor.executepsycopg/cursor.py:1133 ms7.5%
Connection.waitpsycopg/connection.py:4953 ms7.5%
ClientHandler.__call__django/test/client.py:1763 ms7.5%
Signal.senddjango/dispatch/dispatcher.py:2023 ms7.5%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()3 ms7.5%
TestCase._fixture_setupdjango/test/testcases.py:14783 ms7.5%
TestCase._enter_atomicsdjango/test/testcases.py:13963 ms7.5%
Atomic.__enter__django/db/transaction.py:2113 ms7.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms7.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms7.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms7.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.5%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms7.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms7.5%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms7.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms7.5%
CursorWrapper.executedjango/db/backends/utils.py:793 ms7.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms7.5%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms7.5%
Cursor.executepsycopg/cursor.py:1133 ms7.5%
Connection.waitpsycopg/connection.py:4953 ms7.5%
Estimated from 13 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/mcp/tests.py:67
return self.client.post(
McpTest.post · Libraries
20 ms
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate · Database
3 ms
apps/mcp/urls.py:57
SecretTokens.objects.filter(token=token).update(date_last_used=timezone.now())
authenticate · Database
3 ms
apps/projects/analytics.py:185
return list(Environment.objects.filter(project=self.project))
Scope.scoped_environments · Database
3 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_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

10 queries · 4 ms
No repeated queries.

Biggest pieces of work

call test body
apps/mcp/tests.py:262
28 ms
call _pre_setup
django/test/testcases.py:1164
3 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 34 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 51 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 22 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 59 ms e141198 main Profile
1 month ago CI github-actions:test passed 21 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 46 ms afde85b main Profile
1 month ago CI github-actions:test passed 35 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 63 ms 044719a main Profile
1 month ago CI github-actions:test passed 25 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 47 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 45 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 43 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 21 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 41 ms 78a4357 main Profile