Tests / apps/projects/tests.py
AnalyticsTest::test_ci_vs_local_needs_both
First seen 9 hours ago in 78a4357
CI
github-actions:test
5 runs
Average
7 ms
median 7 ms
max 8 ms
max 8 ms
Phases
Setup 0.68 ms
Call 6 ms
Teardown 0.16 ms
Categories
Database 4 ms
Factories 0.48 ms
Other (Unsampled, Libraries) 3 ms
9 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, 2 hours ago ·
open run
call6 ms87.4%
CallInfo.from_call_pytest/runner.py:3536 ms87.4%
call_and_report.<locals>.<lambda>_pytest/runner.py:2456 ms87.4%
HookCaller.__call__pluggy/_hooks.py:5126 ms87.4%
PluginManager._hookexecpluggy/_manager.py:1206 ms87.4%
_multicallpluggy/_callers.py:1216 ms87.4%
pytest_runtest_call_pytest/runner.py:1796 ms87.4%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:5736 ms87.4%
SimpleTestCase.__call__django/test/testcases.py:3136 ms87.4%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3684 ms58.3%
TestCase.__call__<stdlib>/unittest/case.py:7474 ms58.3%
TestCase.run<stdlib>/unittest/case.py:6914 ms58.3%
TestCase._callTestMethod<stdlib>/unittest/case.py:6374 ms58.3%
AnalyticsTest.test_ci_vs_local_needs_bothapps/projects/tests.py:796 self.assertIsNone(ci_vs_local(baker.make(Project)))4 ms58.3%
makemodel_bakery/baker.py:1472 ms29.1%
Baker.makemodel_bakery/baker.py:4062 ms29.1%
Baker._makemodel_bakery/baker.py:4711 ms14.6%
Baker.generate_valuemodel_bakery/baker.py:8001 ms14.6%
gen_relatedmodel_bakery/random_gen.py:2741 ms14.6%
makemodel_bakery/baker.py:1471 ms14.6%
Baker.makemodel_bakery/baker.py:4061 ms14.6%
Baker._makemodel_bakery/baker.py:4431 ms14.6%
Baker._skip_fieldmodel_bakery/baker.py:6291 ms14.6%
Baker._makemodel_bakery/baker.py:4821 ms14.6%
Baker.instancemodel_bakery/baker.py:5351 ms14.6%
Model.savedjango/db/models/base.py:8741 ms14.6%
Model.save_basedjango/db/models/base.py:9661 ms14.6%
Model._save_tabledjango/db/models/base.py:11671 ms14.6%
Model._do_insertdjango/db/models/base.py:12181 ms14.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms14.6%
QuerySet._insertdjango/db/models/query.py:19181 ms14.6%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19241 ms14.6%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18931 ms14.6%
BaseDatabaseOperations.returning_columnsdjango/db/backends/base/operations.py:3641 ms14.6%
ci_vs_localapps/projects/analytics.py:734 ci = list(Environment.objects.filter(project=project, kind=Environment.Kind.CI))1 ms14.6%
QuerySet.__iter__django/db/models/query.py:3901 ms14.6%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms14.6%
ModelIterable.__iter__django/db/models/query.py:951 ms14.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms14.6%
CursorWrapper.executedjango/db/backends/utils.py:791 ms14.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms14.6%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms14.6%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms14.6%
Cursor.executepsycopg/cursor.py:1131 ms14.6%
Connection.waitpsycopg/connection.py:4951 ms14.6%
ci_vs_localapps/projects/analytics.py:735 local = list(Environment.objects.filter(project=project, kind=Environment.Kind.LOCAL))1 ms14.6%
QuerySet.__iter__django/db/models/query.py:3901 ms14.6%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms14.6%
ModelIterable.__iter__django/db/models/query.py:951 ms14.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms14.6%
CursorWrapper.executedjango/db/backends/utils.py:791 ms14.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms14.6%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms14.6%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms14.6%
Cursor.executepsycopg/cursor.py:1131 ms14.6%
Connection.waitpsycopg/connection.py:4951 ms14.6%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3712 ms29.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms29.1%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms29.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4831 ms14.6%
CursorWrapper.executedjango/db/backends/utils.py:791 ms14.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms14.6%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms14.6%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms14.6%
Cursor.executepsycopg/cursor.py:1131 ms14.6%
Connection.waitpsycopg/connection.py:4951 ms14.6%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4841 ms14.6%
CursorWrapper.executedjango/db/backends/utils.py:791 ms14.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms14.6%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1001 ms14.6%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms14.6%
Cursor.executepsycopg/cursor.py:1131 ms14.6%
Connection.waitpsycopg/connection.py:4951 ms14.6%
Estimated from 6 samples; phase durations are exact. Frames from pytest and pluggy are
shown
.
Hot lines in your code
|
apps/projects/tests.py:796
self.assertIsNone(ci_vs_local(baker.make(Project)))
AnalyticsTest.test_ci_vs_local_needs_both
· Factories
|
2 ms |
|
apps/projects/analytics.py:734
ci = list(Environment.objects.filter(project=project, kind=Environment.Kind.CI))
ci_vs_local
· Database
|
1 ms |
|
apps/projects/analytics.py:735
local = list(Environment.objects.filter(project=project, kind=Environment.Kind.LOCAL))
ci_vs_local
· Database
|
1 ms |
Fixtures
Exact setup time| _django_db_marker function | 0.06 ms |
| _dj_autoclear_mailbox function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.04 ms |
| _django_set_urlconf function | 0.04 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
9 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/projects/tests.py:796
|
4 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
2 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 hours ago | CI github-actions:test | passed | 7 ms | Profile |
| 2 hours ago | CI github-actions:test | passed | 8 ms | Profile |
| 9 hours ago | CI github-actions:test | passed | 8 ms | Profile |
| 9 hours ago | CI github-actions:test | passed | 4 ms | Profile |
| 9 hours ago | CI github-actions:test | passed | 7 ms | Profile |