freertos / Lab-Project-FreeRTOS-Cellular-Demo
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 81 units with 2,898 lines of code in units (34.3% of code).
    • 5 very long units (651 lines of code)
    • 11 long units (776 lines of code)
    • 32 medium size units (1,082 lines of code)
    • 17 small units (273 lines of code)
    • 16 very small units (116 lines of code)
22% | 26% | 37% | 9% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c22% | 26% | 37% | 9% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source28% | 36% | 18% | 12% | 3%
source/coreMQTT12% | 20% | 59% | 7% | 0%
source/cellular/qgsm100% | 0% | 0% | 0% | 0%
source/cellular17% | 30% | 38% | 9% | 3%
source/mbedtls0% | 0% | 28% | 0% | 71%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
bool setupCellular()
in source/cellular_setup.c
145 32 1
BaseType_t Sockets_Connect()
in source/coreMQTT/sockets_wrapper.c
132 21 5
static uint8_t nceReinitConnParams()
in source/1nce_zero_touch_provisioning.c
131 13 7
bool setupCellular()
in source/cellular/qgsm/cellular_setup_qgsm.c
126 26 1
static CellularCommInterfaceError_t _prvCommIntfOpen()
in source/cellular/comm_if_windows.c
117 18 3
static uint8_t onboarding_request()
in source/1nce_zero_touch_provisioning.c
96 7 3
static CellularCommInterfaceError_t _prvCommIntfSend()
in source/cellular/comm_if_windows.c
78 15 5
78 15 5
TlsTransportStatus_t TLS_FreeRTOS_Connect()
in source/coreMQTT/using_mbedtls.c
75 13 6
static uint8_t onboarding_request()
in source/1nce_zero_touch_provisioning.c
70 8 3
static BaseType_t prvNetworkRecvCellular()
in source/coreMQTT/sockets_wrapper.c
70 10 3
68 6 2
void RunMQTTTask()
in source/MutualAuthMQTTExample.c
67 5 1
int32_t Sockets_Send()
in source/coreMQTT/sockets_wrapper.c
67 12 3
54 7 1
static void prvMQTTSubscribeWithBackoffRetries()
in source/MutualAuthMQTTExample.c
53 7 1
TlsTransportStatus_t nce_connect()
in source/1nce_zero_touch_provisioning.c
47 6 1
void Sockets_Disconnect()
in source/coreMQTT/sockets_wrapper.c
46 9 1
static TlsTransportStatus_t tlsHandshake()
in source/coreMQTT/using_mbedtls.c
46 6 2
static void prvCreateMQTTConnectionWithBroker()
in source/MutualAuthMQTTExample.c
45 1 2