freertos / Lab-Project-FreeRTOS-Cellular-Demo
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 81 units with 2,898 lines of code in units (34.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (271 lines of code)
    • 7 medium complex units (678 lines of code)
    • 16 simple units (815 lines of code)
    • 56 very simple units (1,134 lines of code)
0% | 9% | 23% | 28% | 39%
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% | 9% | 23% | 28% | 39%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 14% | 13% | 38% | 33%
source/cellular/qgsm0% | 100% | 0% | 0% | 0%
source/coreMQTT0% | 0% | 26% | 30% | 43%
source/cellular0% | 0% | 40% | 18% | 41%
source/mbedtls0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
bool setupCellular()
in source/cellular_setup.c
145 32 1
bool setupCellular()
in source/cellular/qgsm/cellular_setup_qgsm.c
126 26 1
BaseType_t Sockets_Connect()
in source/coreMQTT/sockets_wrapper.c
132 21 5
static CellularCommInterfaceError_t _prvCommIntfOpen()
in source/cellular/comm_if_windows.c
117 18 3
static CellularCommInterfaceError_t _prvCommIntfSend()
in source/cellular/comm_if_windows.c
78 15 5
78 15 5
static uint8_t nceReinitConnParams()
in source/1nce_zero_touch_provisioning.c
131 13 7
TlsTransportStatus_t TLS_FreeRTOS_Connect()
in source/coreMQTT/using_mbedtls.c
75 13 6
int32_t Sockets_Send()
in source/coreMQTT/sockets_wrapper.c
67 12 3
static BaseType_t prvNetworkRecvCellular()
in source/coreMQTT/sockets_wrapper.c
70 10 3
void Sockets_Disconnect()
in source/coreMQTT/sockets_wrapper.c
46 9 1
static uint8_t onboarding_request()
in source/1nce_zero_touch_provisioning.c
70 8 3
DWORD WINAPI _CellularCommReceiveCBThreadFunc()
in source/cellular/comm_if_windows.c
36 8 1
static BaseType_t prvCellularSocketRegisterCallback()
in source/coreMQTT/sockets_wrapper.c
41 8 2
static uint8_t onboarding_request()
in source/1nce_zero_touch_provisioning.c
96 7 3
54 7 1
static void prvMQTTSubscribeWithBackoffRetries()
in source/MutualAuthMQTTExample.c
53 7 1
static void prvMQTTProcessResponse()
in source/MutualAuthMQTTExample.c
36 7 2
TlsTransportStatus_t nce_connect()
in source/1nce_zero_touch_provisioning.c
47 6 1
static void commTaskThread()
in source/cellular/comm_if_windows.c
37 6 1