• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / ark / 13768706324

10 Mar 2025 03:38PM CUT coverage: 99.437%. Remained the same
13768706324

Pull #179

github

web-flow
Merge 8094be2da into 093db9782
Pull Request #179: Fix false-positive debug checks

6538 of 6575 relevant lines covered (99.44%)

27299.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.3
/ecs/query_count.go
1
package ecs
2

3
func countQueryCache(storage *storage, cache *cacheEntry, relations []RelationID) int {
25✔
4
        count := 0
25✔
5
        for _, tableID := range cache.tables {
85✔
6
                table := &storage.tables[tableID]
60✔
7
                if table.Len() == 0 {
76✔
8
                        continue
16✔
9
                }
10
                if !table.Matches(relations) {
52✔
11
                        continue
8✔
12
                }
13
                count += table.Len()
36✔
14
        }
15
        return count
25✔
16
}
17

18
func countQuery(storage *storage, filter *filter, relations []RelationID) int {
80✔
19
        count := 0
80✔
20
        for arch := range storage.archetypes {
309✔
21
                archetype := &storage.archetypes[arch]
229✔
22
                if !filter.matches(&archetype.mask) {
369✔
23
                        continue
140✔
24
                }
25

26
                if !archetype.HasRelations() {
149✔
27
                        table := &storage.tables[archetype.tables[0]]
60✔
28
                        count += table.Len()
60✔
29
                        continue
60✔
30
                }
31

32
                tables := archetype.GetTables(relations)
29✔
33
                for _, tab := range tables {
76✔
34
                        table := &storage.tables[tab]
47✔
35
                        if !table.Matches(relations) {
47✔
36
                                continue
×
37
                        }
38
                        count += table.Len()
47✔
39
                }
40
        }
41
        return count
80✔
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc