aws-samples / alexa-voice-service-integration-for-aws-iot-freertos-porting-kit
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 49 units with 884 lines of code in units (66.3% of code).
    • 1 very long units (178 lines of code)
    • 3 long units (207 lines of code)
    • 8 medium size units (210 lines of code)
    • 9 small units (144 lines of code)
    • 28 very small units (145 lines of code)
20% | 23% | 23% | 16% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c24% | 28% | 29% | 13% | 3%
h0% | 0% | 0% | 26% | 73%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
HTTP92% | 0% | 0% | 7% | 0%
Storage0% | 62% | 16% | 15% | 6%
Registration0% | 0% | 100% | 0% | 0%
LWA0% | 0% | 100% | 0% | 0%
IoT0% | 0% | 30% | 25% | 44%
Clock0% | 0% | 0% | 100% | 0%
Crypto0% | 0% | 0% | 15% | 84%
Common0% | 0% | 0% | 0% | 100%
Memory0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
bool AiaSendHttpsRequest()
in ports/HTTP/src/aia_http_config.c
178 13 5
bool AiaStoreAlert()
in ports/Storage/src/aia_storage_config.c
86 14 5
bool AiaDeleteAlert()
in ports/Storage/src/aia_storage_config.c
64 10 2
bool AiaLoadAlert()
in ports/Storage/src/aia_storage_config.c
57 10 6
bool AiaMqttPublish()
in ports/IoT/src/aia_iot_config.c
38 6 6
bool AiaStoreBlob()
in ports/Storage/src/aia_storage_config.c
27 7 3
bool AiaGetIotClientId()
in ports/Registration/src/aia_registration_config.c
26 5 2
bool AiaGetAwsAccountId()
in ports/Registration/src/aia_registration_config.c
26 5 2
bool AiaLoadBlob()
in ports/Storage/src/aia_storage_config.c
26 7 3
bool AiaGetIotEndpoint()
in ports/Registration/src/aia_registration_config.c
25 5 2
bool AiaGetRefreshToken()
in ports/LWA/src/aia_lwa_config.c
21 4 2
bool AiaGetLwaClientId()
in ports/LWA/src/aia_lwa_config.c
21 4 2
AiaTimepointSeconds_t AiaClock_GetTimeSinceNTPEpoch()
in ports/Clock/src/aia_clock_config.c
20 3 0
bool AiaLoadAlerts()
in ports/Storage/src/aia_storage_config.c
19 3 2
size_t AiaGetBlobSize()
in ports/Storage/src/aia_storage_config.c
18 4 1
void AiaClock_SetTimeSinceNTPEpoch()
in ports/Clock/src/aia_clock_config.c
16 2 1
inline bool AiaMqttSubscribe()
in ports/IoT/include/iot/aia_iot_config.h
16 1 5
inline bool AiaMqttUnsubscribe()
in ports/IoT/include/iot/aia_iot_config.h
16 1 5
bool AiaHttpStoreNetworkInfo()
in ports/HTTP/src/aia_http_config.c
14 3 2
bool AiaBlobExists()
in ports/Storage/src/aia_storage_config.c
14 3 1