aws / aws-sagemaker-edge-quick-device-setup
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 39 units with 872 lines of code in units (79.9% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (237 lines of code)
    • 11 medium size units (341 lines of code)
    • 13 small units (196 lines of code)
    • 12 very small units (98 lines of code)
0% | 27% | 39% | 22% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 27% | 39% | 22% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
aws0% | 18% | 39% | 26% | 15%
ROOT0% | 100% | 0% | 0% | 0%
cli0% | 68% | 0% | 25% | 5%
common0% | 0% | 76% | 17% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
92 5 2
func main()
in main.go
73 3 0
func ParseArgs()
in cli/cli_args.go
72 15 1
func untar()
in common/utils.go
49 13 2
45 4 2
func GetAgentRelease()
in common/utils.go
38 12 3
func unzip()
in common/utils.go
35 9 2
func RegisterDevice()
in aws/sagemaker.go
34 3 5
25 2 3
25 6 3
25 3 4
22 3 3
func DownloadAgent()
in common/utils.go
22 10 2
21 3 2
20 5 3
func CreateDeviceFleet()
in aws/sagemaker.go
20 4 4
func()
in common/agent_config.go
19 1 1
17 4 5
16 3 4
func()
in cli/cli_args.go
15 15 1