Tests / apps/projects/tests.py
AnalyticsTest::test_compare_environments
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
12 ms
median 12 ms
max 19 ms
max 19 ms
Phases
Setup 0.60 ms
Call 11 ms
Teardown 0.15 ms
Categories
Database 11 ms
App code 0.13 ms
Other (Libraries, Unsampled, pytest, Deep copies) 1 ms
11 database queries per run
Needs 2 KB of memory (max 12 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call15 ms96.0%
AnalyticsTest.test_compare_environmentsapps/projects/tests.py:800 comparison = compare(self.project, [self.local], [self.ci])15 ms96.0%
compareapps/projects/analytics.py:6549 ms57.6%
averages_by_testapps/projects/analytics.py:631 for row in daily_totals(rows)9 ms57.6%
daily_totalsapps/projects/analytics.py:406 return rows.values("test_id", "test__name", "test__slug").annotate(9 ms57.6%
QuerySet.annotatedjango/db/models/query.py:16999 ms57.6%
QuerySet._annotatedjango/db/models/query.py:17519 ms57.6%
Query.add_annotationdjango/db/models/sql/query.py:12429 ms57.6%
Aggregate.resolve_expressiondjango/db/models/aggregates.py:1229 ms57.6%
BaseExpression.resolve_expressiondjango/db/models/expressions.py:3019 ms57.6%
F.resolve_expressiondjango/db/models/expressions.py:9049 ms57.6%
Query.resolve_refdjango/db/models/sql/query.py:20779 ms57.6%
Query.setup_joinsdjango/db/models/sql/query.py:18769 ms57.6%
<GC>~9 ms57.6%
compareapps/projects/analytics.py:6553 ms19.2%
averages_by_testapps/projects/analytics.py:631 for row in daily_totals(rows)3 ms19.2%
QuerySet.__iter__django/db/models/query.py:3903 ms19.2%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms19.2%
ValuesIterable.__iter__django/db/models/query.py:2223 ms19.2%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms9.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms9.6%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7952 ms9.6%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms9.6%
WhereNode.as_sqldjango/db/models/sql/where.py:1512 ms9.6%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms9.6%
RelatedIn.as_sqldjango/db/models/fields/related_lookups.py:952 ms9.6%
In.as_sqldjango/db/models/lookups.py:5562 ms9.6%
BuiltinLookup.as_sqldjango/db/models/lookups.py:2382 ms9.6%
BuiltinLookup.process_lhsdjango/db/models/lookups.py:2302 ms9.6%
Lookup.process_lhsdjango/db/models/lookups.py:1102 ms9.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15772 ms9.6%
compareapps/projects/analytics.py:6682 ms9.6%
categories_by_testapps/projects/analytics.py:424 for test_id, run_count, categories in rows.filter(test_id__in=test_ids).values_list(2 ms9.6%
QuerySet.__iter__django/db/models/query.py:3902 ms9.6%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms9.6%
ValuesListIterable.__iter__django/db/models/query.py:2382 ms9.6%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms9.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms9.6%
CursorWrapper.executedjango/db/backends/utils.py:792 ms9.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms9.6%
compareapps/projects/analytics.py:7112 ms9.6%
compare.<locals>.side_summaryapps/projects/analytics.py:695 summaries = list(2 ms9.6%
QuerySet.__iter__django/db/models/query.py:3902 ms9.6%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms9.6%
SQLCompiler.apply_convertersdjango/db/models/sql/compiler.py:15422 ms9.6%
JSONField.from_db_valuedjango/db/models/fields/json.py:922 ms9.6%
loads<stdlib>/json/__init__.py:3712 ms9.6%
JSONDecoder.decode<stdlib>/json/decoder.py:3582 ms9.6%
JSONDecoder.raw_decode<stdlib>/json/decoder.py:3742 ms9.6%
Estimated from 10 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/projects/analytics.py:406
return rows.values("test_id", "test__name", "test__slug").annotate(
daily_totals
· Database
|
9 ms |
|
apps/projects/analytics.py:631
for row in daily_totals(rows)
averages_by_test
· Database
|
3 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
|
2 ms |
|
apps/projects/analytics.py:695
summaries = list(
compare.<locals>.side_summary
· Database
|
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.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
11 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/projects/tests.py:800
|
15 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 | 16 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 19 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 11 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 7 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 9 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 7 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 13 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 12 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 19 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 7 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 13 ms | Profile |