MailJDTourDownloadDocsQualityTestsCoverage

Which source lines and branches the tests execute. Lines 91.5 %, branches 75.0 % (minimum 85 % and 72 %). main @ 399ffe3d · 21 October 2026 · pipeline 7238.

GCC Code Coverage Report


Directory: src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 38 / 0 / 38
Functions: 100.0% 3 / 0 / 3
Branches: 84.9% 45 / 0 / 53

performance/ThreadFixture.h
Line Branch Exec Source
1 #pragma once
2
3 #include "data/Models.h"
4
5 namespace MailJD::Performance {
6
7 // One hundred independently specified identities per repeated thread block.
8 // Parent expectations are fixture data, not computed by ThreadBuilder.
9 203760 inline qint64 threadFixtureParent(qint64 uid) {
10 203760 const qint64 base = ((uid - 1) / 100) * 100;
11 203760 const int offset = static_cast<int>((uid - 1) % 100);
12
4/4
✓ Branch 2 → 3 taken 199600 times.
✓ Branch 2 → 5 taken 4160 times.
✓ Branch 3 → 4 taken 62400 times.
✓ Branch 3 → 5 taken 137200 times.
203760 if (offset >= 2 && offset <= 31)
13 62400 return uid - 1;
14
6/6
✓ Branch 5 → 6 taken 137200 times.
✓ Branch 5 → 7 taken 4160 times.
✓ Branch 6 → 7 taken 74800 times.
✓ Branch 6 → 8 taken 62400 times.
✓ Branch 7 → 8 taken 2080 times.
✓ Branch 7 → 9 taken 76880 times.
141360 if ((offset >= 32 && offset <= 61) || offset == 70)
15 64480 return base + 2;
16
2/2
✓ Branch 9 → 10 taken 1020 times.
✓ Branch 9 → 11 taken 75860 times.
76880 if (offset == 63)
17 1020 return base + 63;
18
2/2
✓ Branch 11 → 12 taken 2080 times.
✓ Branch 11 → 13 taken 73780 times.
75860 if (offset == 64)
19 2080 return base + 66;
20
2/2
✓ Branch 13 → 14 taken 2080 times.
✓ Branch 13 → 15 taken 71700 times.
73780 if (offset == 66)
21 2080 return base + 100;
22
2/2
✓ Branch 15 → 16 taken 1020 times.
✓ Branch 15 → 17 taken 70680 times.
71700 if (offset == 69)
23 1020 return base + 69;
24 70680 return 0;
25 }
26
27 106000 inline void applyThreadFixture(MailHeader &header) {
28 106000 const qint64 uid = header.uid;
29 106000 const qint64 base = ((uid - 1) / 100) * 100;
30 106000 const int offset = static_cast<int>((uid - 1) % 100);
31 174900 const auto messageId = [](qint64 id) {
32
1/1
✓ Branch 6 → 7 taken 174900 times.
349800 return QStringLiteral("s87-thread-%1@example.invalid").arg(id);
33 };
34
3/3
✓ Branch 2 → 3 taken 1060 times.
✓ Branch 2 → 4 taken 104940 times.
✓ Branch 5 → 6 taken 106000 times.
106000 header.messageId = messageId(offset == 68 ? uid - 1 : uid);
35
1/1
✓ Branch 8 → 9 taken 106000 times.
106000 header.references.clear();
36 106000 header.inReplyTo.clear();
37
1/1
✓ Branch 10 → 11 taken 106000 times.
106000 header.inReplyToIds.clear();
38
4/4
✓ Branch 11 → 12 taken 104940 times.
✓ Branch 11 → 13 taken 1060 times.
✓ Branch 12 → 13 taken 1060 times.
✓ Branch 12 → 25 taken 103880 times.
106000 if (offset == 62 || offset == 63)
39
2/4
✓ Branch 20 → 21 taken 2120 times.
✓ Branch 20 → 22 taken 2120 times.
✗ Branch 58 → 59 not taken.
✗ Branch 58 → 60 not taken.
8480 header.references = {QStringLiteral("s87-missing-%1@example.invalid").arg(base)};
40
2/2
✓ Branch 25 → 26 taken 1060 times.
✓ Branch 25 → 32 taken 102820 times.
103880 else if (offset == 65)
41
2/4
✓ Branch 29 → 30 taken 1060 times.
✓ Branch 29 → 31 taken 1060 times.
✗ Branch 75 → 76 not taken.
✗ Branch 75 → 77 not taken.
2120 header.references = {messageId(base + 65)};
42
2/2
✓ Branch 32 → 33 taken 1060 times.
✓ Branch 32 → 39 taken 101760 times.
102820 else if (offset == 69)
43
2/4
✓ Branch 36 → 37 taken 1060 times.
✓ Branch 36 → 38 taken 1060 times.
✗ Branch 85 → 86 not taken.
✗ Branch 85 → 87 not taken.
2120 header.references = {messageId(base + 68)};
44
2/2
✓ Branch 40 → 41 taken 66780 times.
✓ Branch 40 → 47 taken 34980 times.
101760 else if (const qint64 parent = threadFixtureParent(uid); parent > 0)
45
2/4
✓ Branch 44 → 45 taken 66780 times.
✓ Branch 44 → 46 taken 66780 times.
✗ Branch 95 → 96 not taken.
✗ Branch 95 → 97 not taken.
133560 header.references = {messageId(parent)};
46
2/2
✓ Branch 47 → 48 taken 1060 times.
✓ Branch 47 → 55 taken 104940 times.
106000 if (offset == 70) {
47 1060 header.flags &= ~MailFlag::Seen;
48
1/1
✓ Branch 51 → 52 taken 1060 times.
2120 header.labels.append(QStringLiteral("s87-filter-descendant"));
49 }
50 181260 }
51
52 } // namespace MailJD::Performance
53