freertos / FreeRTOS-Community-Supported-Demos
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,310 units with 15,138 lines of code in units (44.0% of code).
    • 2 very long units (349 lines of code)
    • 13 long units (877 lines of code)
    • 129 medium size units (3,869 lines of code)
    • 351 small units (4,969 lines of code)
    • 815 very small units (5,074 lines of code)
2% | 5% | 25% | 32% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c2% | 6% | 28% | 35% | 27%
h0% | 0% | 6% | 16% | 76%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
RISC-V_RV32_THEAD_SMART_CDS/libs16% | 15% | 17% | 24% | 26%
shakti/bsp4% | 6% | 29% | 35% | 25%
CORTEX_M0_FT32F072_KEIL/Source0% | 5% | 26% | 39% | 28%
shakti/parashu0% | 26% | 32% | 25% | 15%
shakti/vajra0% | 26% | 32% | 25% | 15%
RISC-V_RV32_THEAD_SMART_CDS/csi_driver0% | 0% | 36% | 31% | 32%
RISC-V_RV32_THEAD_SMART_CDS/csi_kernel0% | 0% | 35% | 22% | 42%
RISC-V_RV32_THEAD_SMART_CDS/csi_core0% | 0% | 7% | 16% | 75%
shakti/pinaka0% | 0% | 0% | 43% | 56%
RISC-V_RV32_THEAD_SMART_CDS/board0% | 0% | 0% | 100% | 0%
RISC-V_RV32_THEAD_SMART_CDS/projects0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static int _vsnprintf()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
241 86 5
void _printf_()
in shakti/bsp/libs/printf.c
108 28 2
static size_t _ftoa()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
96 36 8
void RCC_GetClocksFreq()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_rcc.c
91 14 1
void RTC_SetAlarm()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
81 7 3
ErrorStatus RTC_SetTime()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
79 8 2
static size_t _etoa()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
71 24 8
ErrorStatus RTC_SetDate()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_rtc.c
67 8 2
int config_i2c()
in shakti/bsp/drivers/i2c/i2c_driver.c
58 7 3
void mm_free()
in RISC-V_RV32_THEAD_SMART_CDS/libs/mm/mm_free.c
58 8 3
void vTaskbmp280()
in shakti/parashu/main.c
57 7 1
void vTaskbmp280()
in shakti/vajra/main.c
57 7 1
void deploy()
in shakti/bsp/utils/uploader/micron/deploy.c
55 6 0
void USART_Init()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_usart.c
55 6 2
static void trap_init()
in shakti/bsp/core/init.c
52 1 1
int read_bmp280_values()
in shakti/parashu/main.c
50 3 5
int read_bmp280_values()
in shakti/vajra/main.c
50 3 5
static void TI1_Config()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_tim.c
50 8 4
int i2c_send_interrupt_slave_address()
in shakti/bsp/drivers/i2c/i2c_driver.c
49 7 4
int i2c_send_slave_address()
in shakti/bsp/drivers/i2c/i2c_driver.c
47 7 4