/
stats.go
43 lines (34 loc) · 1.06 KB
/
stats.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package sdk
import (
"time"
)
// Stats aggregates all CDS stats
type Stats struct {
History []Week
}
// Week exposes what happened in a week timeframe
type Week struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
Builds int64 `json:"builds_completed"`
UnitTests int64 `json:"unit_tests"`
MaxBuildingWorkers int64 `json:"max_building_worker"`
MaxBuildingPipelines int64 `json:"max_building_pipeline"`
Users int64 `json:"period_total_users"`
NewUsers int64 `json:"new_users"`
Projects int64 `json:"period_total_projects"`
NewProjects int64 `json:"new_projects"`
Applications int64 `json:"period_total_applications"`
NewApplications int64 `json:"new_applications"`
Pipelines struct {
Build int64 `json:"build"`
Testing int64 `json:"testing"`
Deploy int64 `json:"deploy"`
} `json:"period_total_pipelines"`
NewPipelines int64 `json:"new_pipelines"`
RunnedPipelines struct {
Build int64 `json:"build"`
Testing int64 `json:"testing"`
Deploy int64 `json:"deploy"`
} `json:"runned_pipelines"`
}