aws-quickstart / quickstart-iot-device-connectivity
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 80 units with 2,086 lines of code in units (39.5% of code).
    • 2 very long units (717 lines of code)
    • 5 long units (308 lines of code)
    • 18 medium size units (530 lines of code)
    • 23 small units (351 lines of code)
    • 32 very small units (180 lines of code)
34% | 14% | 25% | 16% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts100% | 0% | 0% | 0% | 0%
go0% | 22% | 38% | 25% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
iot-onboarding-infra/lib100% | 0% | 0% | 0% | 0%
iot-onboarding-code-pipelines/lib100% | 0% | 0% | 0% | 0%
iot-onboarding-service/src/cloudrack-lambda-core0% | 22% | 43% | 20% | 13%
iot-onboarding-service/src/main0% | 51% | 0% | 39% | 10%
iot-onboarding-service/src/cloudrack-lambda-fn0% | 0% | 20% | 66% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in iot-onboarding-infra/lib/iot-onboarding-infra-stack.ts
417 10 3
constructor()
in iot-onboarding-code-pipelines/lib/iot-onboarding-code-pipelines-stack.ts
300 3 3
func()
in iot-onboarding-service/src/cloudrack-lambda-core/iot/iot.go
74 7 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
72 11 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
58 12 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/iot/iot.go
53 7 1
func HandleRequest()
in iot-onboarding-service/src/main/main.go
51 12 2
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
47 11 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
47 11 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/s3/s3.go
37 7 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/s3/s3.go
36 4 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
35 3 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
32 5 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/s3/s3.go
31 4 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/core/utils.go
29 5 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/core/utils.go
28 6 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/db/db.go
27 3 1
func buildPolicy()
in iot-onboarding-service/src/cloudrack-lambda-core/iot/iot.go
25 1 3
func()
in iot-onboarding-service/src/cloudrack-lambda-core/s3/s3.go
24 3 1
func()
in iot-onboarding-service/src/cloudrack-lambda-core/core/utils.go
24 4 1