aws-samples / alexa-voice-service-integration-for-aws-iot-freertos-porting-kit
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 49 units with 884 lines of code in units (66.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (264 lines of code)
    • 5 simple units (212 lines of code)
    • 42 very simple units (408 lines of code)
0% | 0% | 29% | 23% | 46%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 0% | 36% | 29% | 34%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
HTTP0% | 0% | 92% | 0% | 7%
Storage0% | 0% | 25% | 52% | 21%
IoT0% | 0% | 0% | 30% | 69%
Registration0% | 0% | 0% | 0% | 100%
Crypto0% | 0% | 0% | 0% | 100%
LWA0% | 0% | 0% | 0% | 100%
Clock0% | 0% | 0% | 0% | 100%
Common0% | 0% | 0% | 0% | 100%
Memory0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool AiaStoreAlert()
in ports/Storage/src/aia_storage_config.c
86 14 5
bool AiaSendHttpsRequest()
in ports/HTTP/src/aia_http_config.c
178 13 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 AiaStoreBlob()
in ports/Storage/src/aia_storage_config.c
27 7 3
bool AiaLoadBlob()
in ports/Storage/src/aia_storage_config.c
26 7 3
bool AiaMqttPublish()
in ports/IoT/src/aia_iot_config.c
38 6 6
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 AiaGetIotEndpoint()
in ports/Registration/src/aia_registration_config.c
25 5 2
inline bool AiaFindJsonValue()
in ports/IoT/include/iot/aia_iot_config.h
10 5 6
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
size_t AiaGetBlobSize()
in ports/Storage/src/aia_storage_config.c
18 4 1
bool AiaHttpStoreNetworkInfo()
in ports/HTTP/src/aia_http_config.c
14 3 2
AiaTimepointSeconds_t AiaClock_GetTimeSinceNTPEpoch()
in ports/Clock/src/aia_clock_config.c
20 3 0
bool AiaBlobExists()
in ports/Storage/src/aia_storage_config.c
14 3 1
bool AiaLoadAlerts()
in ports/Storage/src/aia_storage_config.c
19 3 2
void AiaClock_SetTimeSinceNTPEpoch()
in ports/Clock/src/aia_clock_config.c
16 2 1
static inline void AiaAtomic_Store_u32()
in ports/IoT/include/iot/aia_iot_config.h
6 2 2