Tests / apps/mcp/tests.py
McpTest::test_get_test_by_substring
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
47 ms
median 49 ms
max 69 ms
max 69 ms
Phases
Setup 0.61 ms
Call 46 ms
Teardown 0.14 ms
Categories
Database 26 ms
App code 1 ms
Test code 0.15 ms
Other (Libraries, Unsampled, pytest, Serialization) 20 ms
17 database queries per run
Needs 98 KB of memory (max 540 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call46 ms98.7%
McpTest.test_get_test_by_substringapps/mcp/tests.py:235 self.assertEqual(self.call("get_test", nodeid="test_monthly_report")["nodeid"], SLOW)44 ms95.0%
McpTest.callapps/mcp/tests.py:8242 ms91.4%
McpTest.rpcapps/mcp/tests.py:7542 ms91.4%
McpTest.postapps/mcp/tests.py:67 return self.client.post(42 ms91.4%
Client.postdjango/test/client.py:115342 ms91.4%
RequestFactory.postdjango/test/client.py:49942 ms91.4%
RequestFactory.genericdjango/test/client.py:67142 ms91.4%
Client.requestdjango/test/client.py:108242 ms91.4%
ClientHandler.__call__django/test/client.py:17324 ms51.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6224 ms51.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10424 ms51.2%
WhiteNoise.add_fileswhitenoise/base.py:10824 ms51.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12020 ms43.9%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13120 ms43.9%
WhiteNoise.get_static_filewhitenoise/base.py:20819 ms40.2%
StaticFile.__init__whitenoise/responders.py:7715 ms32.9%
StaticFile.get_alternativeswhitenoise/responders.py:20015 ms32.9%
__init____init__:-115 ms32.9%
Headers.__init__<stdlib>/wsgiref/headers.py:3615 ms32.9%
<GC>~15 ms32.9%
StaticFile.__init__whitenoise/responders.py:732 ms3.7%
StaticFile.get_headerswhitenoise/responders.py:1762 ms3.7%
formatdate<stdlib>/email/utils.py:2662 ms3.7%
format_datetime<stdlib>/email/utils.py:2842 ms3.7%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms3.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms3.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms3.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms3.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms3.7%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms3.7%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1862 ms3.7%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2092 ms3.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms7.3%
scantreewhitenoise/base.py:2623 ms7.3%
scantreewhitenoise/base.py:2623 ms7.3%
scantreewhitenoise/base.py:2642 ms3.7%
scantreewhitenoise/base.py:2602 ms3.7%
ClientHandler.__call__django/test/client.py:18619 ms40.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14119 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13019 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12319 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3419 ms40.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms40.2%
BaseHandler._get_responsedjango/core/handlers/base.py:19819 ms40.2%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6519 ms40.2%
mcpapps/mcp/urls.py:14710 ms21.9%
handleapps/mcp/urls.py:11510 ms21.9%
call_toolapps/mcp/urls.py:7510 ms21.9%
Tools.callapps/mcp/tools.py:18810 ms21.9%
Tools.get_testapps/mcp/tools.py:3023 ms7.3%
Tools.find_testapps/mcp/tools.py:288 test = tests.filter(name=nodeid).first()2 ms3.7%
QuerySet.firstdjango/db/models/query.py:11452 ms3.7%
QuerySet.__iter__django/db/models/query.py:3902 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms3.7%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms3.7%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms3.7%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms3.7%
Tools.find_testapps/mcp/tools.py:291 matches = list(tests.filter(name__contains=nodeid).order_by("name")[:11])2 ms3.7%
QuerySet.__iter__django/db/models/query.py:3902 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
Tools.get_testapps/mcp/tools.py:3042 ms3.7%
environment_stats_for_testapps/projects/analytics.py:748 for perf in TestPerf.objects.filter(test=test, date__gte=since).select_related("environment").order_by("date"):2 ms3.7%
QuerySet.__iter__django/db/models/query.py:3902 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
Tools.get_testapps/mcp/tools.py:3092 ms3.7%
Tools.urlapps/mcp/tools.py:1722 ms3.7%
Project.urlapps/projects/models.py:59 return reverse(name, args=[self.organization.slug, self.slug, *args])2 ms3.7%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2572 ms3.7%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2222 ms3.7%
QuerySet.getdjango/db/models/query.py:6352 ms3.7%
QuerySet.__len__django/db/models/query.py:3722 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms3.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms3.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:882 ms3.7%
WhereNode.split_having_qualifydjango/db/models/sql/where.py:472 ms3.7%
Tools.get_testapps/mcp/tools.py:3302 ms3.7%
latest_perfapps/projects/analytics.py:846 return perfs.select_related("profile", "environment").order_by("-date").first()2 ms3.7%
QuerySet.firstdjango/db/models/query.py:11452 ms3.7%
QuerySet.__iter__django/db/models/query.py:3902 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
Tools.get_testapps/mcp/tools.py:3712 ms3.7%
flakiness_for_testapps/projects/flakiness.py:326 history = observations_for(test.project, [test.id], since).get(test.id, [])2 ms3.7%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2572 ms3.7%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2222 ms3.7%
QuerySet.getdjango/db/models/query.py:6352 ms3.7%
QuerySet.__len__django/db/models/query.py:3722 ms3.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.7%
ModelIterable.__iter__django/db/models/query.py:952 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
mcpapps/mcp/urls.py:1258 ms18.3%
authenticateapps/mcp/urls.py:55 project = Project.objects.filter(secrettokens__token=token).first()8 ms18.3%
QuerySet.firstdjango/db/models/query.py:11458 ms18.3%
QuerySet.__iter__django/db/models/query.py:3908 ms18.3%
QuerySet._fetch_alldjango/db/models/query.py:20008 ms18.3%
ModelIterable.__iter__django/db/models/query.py:958 ms18.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16117 ms14.6%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7675 ms11.0%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms7.3%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms7.3%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2552 ms3.7%
SQLCompiler.get_default_columnsdjango/db/models/sql/compiler.py:10302 ms3.7%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3172 ms3.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms3.7%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:872 ms3.7%
SQLCompiler.get_order_bydjango/db/models/sql/compiler.py:4912 ms3.7%
SQLCompiler._order_by_pairsdjango/db/models/sql/compiler.py:4742 ms3.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7922 ms3.7%
SQLCompiler.get_from_clausedjango/db/models/sql/compiler.py:11592 ms3.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms3.7%
Join.as_sqldjango/db/models/sql/datastructures.py:882 ms3.7%
DatabaseOperations.prepare_join_on_clausedjango/db/backends/postgresql/operations.py:3992 ms3.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
McpTest.callapps/mcp/tests.py:86 return json.loads(result["content"][0]["text"])2 ms3.7%
loads<stdlib>/json/__init__.py:3712 ms3.7%
JSONDecoder.decode<stdlib>/json/decoder.py:3582 ms3.7%
JSONDecoder.raw_decode<stdlib>/json/decoder.py:3742 ms3.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms3.7%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms3.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4842 ms3.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.7%
Cursor.executepsycopg/cursor.py:1132 ms3.7%
Connection.waitpsycopg/connection.py:4952 ms3.7%
Estimated from 27 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
|
24 ms |
|
apps/mcp/urls.py:55
project = Project.objects.filter(secrettokens__token=token).first()
authenticate
· Database
|
8 ms |
|
apps/mcp/tools.py:288
test = tests.filter(name=nodeid).first()
Tools.find_test
· Database
|
2 ms |
|
apps/mcp/tools.py:291
matches = list(tests.filter(name__contains=nodeid).order_by("name")[:11])
Tools.find_test
· Database
|
2 ms |
|
apps/projects/analytics.py:748
for perf in TestPerf.objects.filter(test=test, date__gte=since).select_related("environment").order_by("date"):
environment_stats_for_test
· Database
|
2 ms |
|
apps/projects/models.py:59
return reverse(name, args=[self.organization.slug, self.slug, *args])
Project.url
· Database
|
2 ms |
|
apps/projects/analytics.py:846
return perfs.select_related("profile", "environment").order_by("-date").first()
latest_perf
· Database
|
2 ms |
|
apps/projects/flakiness.py:326
history = observations_for(test.project, [test.id], since).get(test.id, [])
flakiness_for_test
· Database
|
2 ms |
|
apps/mcp/tests.py:86
return json.loads(result["content"][0]["text"])
McpTest.call
· Serialization
|
2 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.02 ms |
| _django_set_urlconf function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.01 ms |
Database
17 queries · 6 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/mcp/tests.py:235
|
44 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
2 ms |
Reliability
15 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 15 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 46 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 47 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 31 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 49 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 25 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 53 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 38 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 69 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 29 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 60 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 57 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 56 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 61 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 25 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 54 ms | Profile |