aws / ota-for-aws-iot-embedded-sdk
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 110 units with 3,735 lines of code in units (65.8% of code).
    • 4 very long units (435 lines of code)
    • 19 long units (1,199 lines of code)
    • 50 medium size units (1,637 lines of code)
    • 24 small units (374 lines of code)
    • 13 very small units (90 lines of code)
11% | 32% | 43% | 10% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c11% | 32% | 43% | 10% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source13% | 33% | 41% | 9% | 2%
source/portable/os0% | 23% | 60% | 14% | 1%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
116 25 7
113 1 4
103 20 10
103 4 6
90 11 1
77 4 1
76 13 1
Base64Status_t base64Decode()
in source/ota_base64.c
70 15 5
68 11 5
OtaErr_t setDataInterface()
in source/ota_interface.c
67 11 2
66 15 1
OtaErr_t requestJob_Mqtt()
in source/ota_mqtt.c
66 5 1
64 8 6
61 10 3
60 7 2
60 6 5
OtaOsStatus_t OtaStartTimer_FreeRTOS()
in source/portable/os/ota_os_freertos.c
59 5 4
OtaOsStatus_t Posix_OtaStartTimer()
in source/portable/os/ota_os_posix.c
54 5 4
53 6 1
53 7 2