freertos / Lab-Project-FreeRTOS-SESIP
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 1,482 units with 22,902 lines of code in units (46.1% of code).
    • 13 very long units (1,722 lines of code)
    • 55 long units (3,833 lines of code)
    • 267 medium size units (8,252 lines of code)
    • 307 small units (4,400 lines of code)
    • 840 very small units (4,695 lines of code)
7% | 16% | 36% | 19% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c9% | 21% | 41% | 17% | 9%
h0% | 0% | 13% | 22% | 63%
py0% | 0% | 31% | 41% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/nxp/utilities37% | 20% | 27% | 8% | 6%
lib/nxp/drivers6% | 13% | 44% | 23% | 12%
lib/FreeRTOS/platform8% | 23% | 52% | 8% | 7%
lib/FreeRTOS/FreeRTOS-Plus-Trace3% | 13% | 46% | 21% | 14%
lib/nxp/board39% | 0% | 19% | 27% | 13%
source8% | 28% | 38% | 16% | 7%
lib/nxp/component5% | 31% | 36% | 19% | 7%
lib/FreeRTOS/provision0% | 71% | 25% | 2% | 0%
lib/bootloader0% | 42% | 10% | 28% | 17%
lib/nxp/bootloader0% | 42% | 10% | 28% | 17%
lib/nxp/mflash0% | 23% | 31% | 36% | 9%
lib/nxp/device0% | 25% | 48% | 22% | 3%
lib/nxp/phy0% | 39% | 21% | 13% | 24%
lib/nxp/CMSIS0% | 0% | 14% | 19% | 65%
tools0% | 0% | 31% | 41% | 27%
source/user0% | 0% | 76% | 23% | 0%
lib/nxp/startup0% | 0% | 18% | 0% | 81%
lib/nxp/mdio0% | 0% | 0% | 27% | 72%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int StrFormatPrintf()
in lib/nxp/utilities/fsl_str.c
204 22 4
int StrFormatScanf()
in lib/nxp/utilities/fsl_str.c
167 23 3
static TlsTransportStatus_t tlsSetup()
in lib/FreeRTOS/platform/freertos/transport/src/tls_freertos_pkcs11.c
158 21 3
static uint8_t StrFormatScanfStringHandling()
in lib/nxp/utilities/fsl_str.c
145 26 4
status_t ENET_ReadFrame()
in lib/nxp/drivers/fsl_enet.c
141 19 5
static uint8_t prvTraceUserEventFormat()
in lib/FreeRTOS/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c
127 27 4
void BOARD_InitPins()
in lib/nxp/board/pin_mux.c
124 1 1
static void hello_task()
in source/main.c
116 10 1
status_t DbgConsole_Init()
in lib/nxp/utilities/fsl_debug_console.c
115 16 4
void USART_TransferHandleIRQ()
in lib/nxp/drivers/fsl_usart.c
112 33 2
void EMC_DynamicMemInit()
in lib/nxp/drivers/fsl_emc.c
105 11 4
serial_manager_status_t SerialManager_Init()
in lib/nxp/component/serial_manager/serial_manager.c
104 26 2
static int32_t ConvertRadixNumToString()
in lib/nxp/utilities/fsl_str.c
104 10 5
97 19 2
int32_t boot_run()
in lib/bootloader/spifi_boot.c
96 15 1
int32_t boot_run()
in lib/nxp/bootloader/spifi_boot.c
96 15 1
static int32_t ConvertFloatRadixNumToString()
in lib/nxp/utilities/fsl_str.c
94 11 4
static void SerialManager_RxCallback()
in lib/nxp/component/serial_manager/serial_manager.c
92 17 3
void prvTraceInitTraceData()
in lib/FreeRTOS/FreeRTOS-Plus-Trace/trcSnapshotRecorder.c
89 6 0
static void prvMQTTAgentLoop()
in source/core_mqtt_agent.c
89 13 1