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

mlange-42 / ark / 13839993888

13 Mar 2025 04:43PM CUT coverage: 99.547%. Remained the same
13839993888

Pull #193

github

web-flow
Merge 065c7d611 into 1c7cafdcb
Pull Request #193: Add user guide chapter on world statistics

8353 of 8391 relevant lines covered (99.55%)

20659.2 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 {
26✔
4
        count := 0
26✔
5
        for _, tableID := range cache.tables {
87✔
6
                table := &storage.tables[tableID]
61✔
7
                if table.Len() == 0 {
77✔
8
                        continue
16✔
9
                }
10
                if !table.Matches(relations) {
53✔
11
                        continue
8✔
12
                }
13
                count += table.Len()
37✔
14
        }
15
        return count
26✔
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