aws-samples / aws-iot-jobs-full-system-update
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 409 lines of code in units (74.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (61 lines of code)
    • 3 medium size units (70 lines of code)
    • 9 small units (127 lines of code)
    • 27 very small units (151 lines of code)
0% | 14% | 17% | 31% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 14% | 17% | 31% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
awsiotjobs/mender0% | 44% | 16% | 13% | 25%
awsiotjobs0% | 0% | 11% | 42% | 46%
ROOT0% | 0% | 100% | 0% | 0%
mendercmd0% | 0% | 0% | 66% | 33%
cmd0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in awsiotjobs/mender/mender.go
61 12 1
func main()
in goagent.go
24 2 0
func NewTLSConfig()
in awsiotjobs/awsiotjobs.go
24 4 3
func Process()
in awsiotjobs/mender/mender.go
22 5 1
func parseJobDocument()
in awsiotjobs/mender/mender.go
19 4 1
func execMender()
in mendercmd/mender_cmd.go
18 4 3
func()
in awsiotjobs/awsiotjobs.go
15 2 1
func()
in awsiotjobs/awsiotjobs.go
15 2 1
func()
in awsiotjobs/awsiotjobs.go
13 4 1
func()
in awsiotjobs/awsiotjobs.go
13 2 1
func parseJobMessage()
in awsiotjobs/awsiotjobs.go
12 2 1
func()
in awsiotjobs/awsiotjobs.go
11 1 1
func()
in awsiotjobs/awsiotjobs.go
11 2 1
func()
in awsiotjobs/awsiotjobs.go
10 1 1
func()
in awsiotjobs/awsiotjobs.go
10 3 1
func()
in awsiotjobs/mender/mender.go
9 1 1
func()
in awsiotjobs/awsiotjobs.go
9 2 1
func()
in awsiotjobs/awsiotjobs.go
9 1 1
func()
in awsiotjobs/awsiotjobs.go
8 1 1
func()
in awsiotjobs/awsiotjobs.go
8 1 1