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

moosetechnology / GitProjectHealth / 12087642532

29 Nov 2024 03:56PM UTC coverage: 59.195% (-0.004%) from 59.199%
12087642532

Pull #112

github

web-flow
Merge 8d4e0e080 into 2f02e4eeb
Pull Request #112: feat(Metrics): add CommitFrequencyProjectMetric

76 of 141 new or added lines in 5 files covered. (53.9%)

5 existing lines in 2 files now uncovered.

9663 of 16324 relevant lines covered (59.2%)

0.59 hits per line

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

82.61
/src/GitLabHealth-Model-Analysis/CommitFrequencyProjectMetric.class.st
1
Class {
2
        #name : #CommitFrequencyProjectMetric,
3
        #superclass : #ProjectMetric,
4
        #category : #'GitLabHealth-Model-Analysis'
5
}
6

7
{ #category : #calculating }
8
CommitFrequencyProjectMetric >> calculate [
1✔
9

1✔
10
        | groupedByDate |
1✔
11
        projectCommits ifNil: [ self load ].
1✔
12
        
1✔
13
        groupedByDate := self setupGroupedDate.
1✔
14

1✔
15
        projectCommits do: [ :c |
1✔
16
                | dateOver |
1✔
17
                dateOver := self transformDate: c created_at to: over.
1✔
18
                groupedByDate at: dateOver printString ifPresent: [ :v | v add: c ] ].
1✔
19

1✔
20
        groupedByDate := groupedByDate collect: [ :group | group size ].
1✔
21

1✔
22
        ^ groupedByDate average asFloat
1✔
23
]
1✔
24

25
{ #category : #accessing }
NEW
26
CommitFrequencyProjectMetric >> description [
×
NEW
27

×
NEW
28
        ^ 'commits frequency (avg)'
×
NEW
29
]
×
30

31
{ #category : #loading }
32
CommitFrequencyProjectMetric >> load [
1✔
33
        projectCommits := self loadCommitsSince: (period at: #since) until: (period at: #until) 
1✔
34
]
1✔
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

© 2026 Coveralls, Inc