aws-quickstart / cur-dashboard
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 40 units with 1,132 lines of code in units (52.7% of code).
    • 2 very long units (213 lines of code)
    • 7 long units (447 lines of code)
    • 8 medium size units (218 lines of code)
    • 13 small units (190 lines of code)
    • 10 very small units (64 lines of code)
18% | 39% | 19% | 16% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go18% | 39% | 19% | 16% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts/go/example/curcli100% | 0% | 0% | 0% | 0%
scripts/go/costcli37% | 25% | 0% | 30% | 5%
scripts/go/analyzeCUR0% | 73% | 15% | 6% | 5%
scripts/go/curconvert0% | 29% | 42% | 20% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func main()
in scripts/go/example/curcli/curcli.go
108 8 0
func main()
in scripts/go/costcli/costcli.go
105 8 0
func main()
in scripts/go/analyzeCUR/analyzeCUR.go
83 18 0
func sendQuery()
in scripts/go/costcli/costcli.go
72 17 6
func sendQuery()
in scripts/go/analyzeCUR/analyzeCUR.go
68 16 5
func sendMetric()
in scripts/go/analyzeCUR/analyzeCUR.go
58 11 7
func()
in scripts/go/curconvert/curconvert.go
57 13 1
func()
in scripts/go/curconvert/curconvert.go
55 13 1
func processCUR()
in scripts/go/analyzeCUR/analyzeCUR.go
54 10 7
func()
in scripts/go/curconvert/curconvert.go
36 8 1
func()
in scripts/go/curconvert/curconvert.go
35 6 1
func getInstanceMetadata()
in scripts/go/analyzeCUR/analyzeCUR.go
28 6 1
func getParams()
in scripts/go/analyzeCUR/analyzeCUR.go
26 6 8
func NewCurConvert()
in scripts/go/curconvert/curconvert.go
25 1 4
func()
in scripts/go/curconvert/curconvert.go
25 7 1
func()
in scripts/go/curconvert/curconvert.go
22 4 1
func()
in scripts/go/curconvert/curconvert.go
21 4 1
func processResults()
in scripts/go/costcli/costcli.go
20 4 2
func()
in scripts/go/curconvert/curconvert.go
20 6 1
func()
in scripts/go/curconvert/curconvert.go
20 4 1