Tests / apps/projects/tests.py
AnalyticsTest::test_ci_vs_local
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
13 ms
median 15 ms
max 20 ms
max 20 ms
Phases
Setup 0.66 ms
Call 13 ms
Teardown 0.15 ms
Categories
Database 11 ms
App code 1 ms
Other (Unsampled, Libraries, Deep copies, pytest) 0.97 ms
13 database queries per run
Needs 1 KB of memory (max 4 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call12 ms94.2%
AnalyticsTest.test_ci_vs_localapps/projects/tests.py:789 comparison = ci_vs_local(self.project)10 ms82.5%
ci_vs_localapps/projects/analytics.py:7389 ms70.7%
compareapps/projects/analytics.py:6553 ms23.6%
averages_by_testapps/projects/analytics.py:631 for row in daily_totals(rows)3 ms23.6%
QuerySet.__iter__django/db/models/query.py:3903 ms23.6%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms23.6%
ValuesIterable.__iter__django/db/models/query.py:2223 ms23.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15733 ms23.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms23.6%
CursorWrapper.executedjango/db/backends/utils.py:793 ms23.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms23.6%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms23.6%
Cursor.executepsycopg/cursor.py:1133 ms23.6%
Connection.waitpsycopg/connection.py:4953 ms23.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms23.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms23.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms23.6%
compareapps/projects/analytics.py:6683 ms23.6%
categories_by_testapps/projects/analytics.py:424 for test_id, run_count, categories in rows.filter(test_id__in=test_ids).values_list(3 ms23.6%
QuerySet.filterdjango/db/models/query.py:15423 ms23.6%
QuerySet._filter_or_excludedjango/db/models/query.py:15603 ms23.6%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15703 ms23.6%
Query.add_qdjango/db/models/sql/query.py:16713 ms23.6%
Query._add_qdjango/db/models/sql/query.py:17033 ms23.6%
Query.build_filterdjango/db/models/sql/query.py:16071 ms11.8%
Query._get_coldjango/db/models/sql/query.py:4511 ms11.8%
Query.build_filterdjango/db/models/sql/query.py:16131 ms11.8%
compareapps/projects/analytics.py:6541 ms11.8%
averages_by_testapps/projects/analytics.py:631 for row in daily_totals(rows)1 ms11.8%
QuerySet.__iter__django/db/models/query.py:3901 ms11.8%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms11.8%
ValuesIterable.__iter__django/db/models/query.py:2221 ms11.8%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15731 ms11.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms11.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms11.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms11.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms11.8%
Cursor.executepsycopg/cursor.py:1131 ms11.8%
Connection.waitpsycopg/connection.py:4951 ms11.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms11.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms11.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms11.8%
compareapps/projects/analytics.py:7111 ms11.8%
compare.<locals>.side_summaryapps/projects/analytics.py:695 summaries = list(1 ms11.8%
QuerySet.__iter__django/db/models/query.py:3901 ms11.8%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms11.8%
ValuesListIterable.__iter__django/db/models/query.py:2371 ms11.8%
ci_vs_localapps/projects/analytics.py:735 local = list(Environment.objects.filter(project=project, kind=Environment.Kind.LOCAL))1 ms11.8%
QuerySet.__iter__django/db/models/query.py:3901 ms11.8%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms11.8%
ModelIterable.__iter__django/db/models/query.py:951 ms11.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms11.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms11.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms11.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms11.8%
Cursor.executepsycopg/cursor.py:1131 ms11.8%
Connection.waitpsycopg/connection.py:4951 ms11.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()1 ms11.8%
TestCase._fixture_teardowndjango/test/testcases.py:14951 ms11.8%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4841 ms11.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms11.8%
Estimated from 8 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/projects/analytics.py:631
for row in daily_totals(rows)
averages_by_test
· Database
|
4 ms |
|
apps/projects/analytics.py:424
for test_id, run_count, categories in rows.filter(test_id__in=test_ids).values_list(
categories_by_test
· Database
|
3 ms |
|
apps/projects/analytics.py:735
local = list(Environment.objects.filter(project=project, kind=Environment.Kind.LOCAL))
ci_vs_local
· Database
|
1 ms |
|
apps/projects/analytics.py:695
summaries = list(
compare.<locals>.side_summary
· Database
|
1 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.02 ms |
| monkeypatch function | 0.02 ms |
Database
13 queries · 5 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/projects/tests.py:789
|
10 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
1 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 | 12 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 15 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 9 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 13 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 15 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 13 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 15 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 10 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 15 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 15 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 20 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 16 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 15 ms | Profile |