freertos / FreeRTOS-Community-Supported-Demos
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 1,310 units with 15,138 lines of code in units (44.0% of code).
    • 1 very complex units (241 lines of code)
    • 3 complex units (250 lines of code)
    • 8 medium complex units (371 lines of code)
    • 58 simple units (2,001 lines of code)
    • 1,240 very simple units (12,275 lines of code)
1% | 1% | 2% | 13% | 81%
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
c1% | 1% | 2% | 14% | 79%
h0% | 0% | 2% | 5% | 91%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
RISC-V_RV32_THEAD_SMART_CDS/libs16% | 9% | 4% | 9% | 59%
shakti/bsp0% | 4% | 0% | 17% | 78%
CORTEX_M0_FT32F072_KEIL/Source0% | 0% | 1% | 11% | 86%
RISC-V_RV32_THEAD_SMART_CDS/csi_driver0% | 0% | 5% | 15% | 78%
RISC-V_RV32_THEAD_SMART_CDS/csi_kernel0% | 0% | 10% | 19% | 70%
RISC-V_RV32_THEAD_SMART_CDS/csi_core0% | 0% | 2% | 6% | 90%
shakti/parashu0% | 0% | 0% | 26% | 73%
shakti/vajra0% | 0% | 0% | 26% | 73%
RISC-V_RV32_THEAD_SMART_CDS/projects0% | 0% | 0% | 0% | 100%
shakti/pinaka0% | 0% | 0% | 0% | 100%
RISC-V_RV32_THEAD_SMART_CDS/board0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static int _vsnprintf()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
241 86 5
static size_t _ftoa()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
96 36 8
static size_t _ntoa_format()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
46 31 11
void _printf_()
in shakti/bsp/libs/printf.c
108 28 2
static size_t _etoa()
in RISC-V_RV32_THEAD_SMART_CDS/libs/libc/printf.c
71 24 8
k_status_t csi_kernel_event_wait()
in RISC-V_RV32_THEAD_SMART_CDS/csi_kernel/freertosv10.3.1/adapter/csi_freertos.c
46 18 6
__STATIC_INLINE uint32_t __get_PMPADDRx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/csi_rv32_gcc.h
22 17 1
__STATIC_INLINE void __set_PMPADDRx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/csi_rv32_gcc.h
22 17 2
int32_t target_gpio_port_init()
in RISC-V_RV32_THEAD_SMART_CDS/csi_driver/smartl_rv32/devices.c
47 15 5
void RCC_GetClocksFreq()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_rcc.c
91 14 1
k_status_t csi_kernel_msgq_put()
in RISC-V_RV32_THEAD_SMART_CDS/csi_kernel/freertosv10.3.1/adapter/csi_freertos.c
31 13 4
static void ck_usart_intr_recv_line()
in RISC-V_RV32_THEAD_SMART_CDS/csi_driver/smartl_rv32/ck_usart.c
41 12 2
uint8_t OPA_Cali()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_opa.c
45 10 1
int readbytes()
in shakti/bsp/drivers/i2c/i2c_driver.c
33 9 4
void TIM_TimeBaseInit()
in CORTEX_M0_FT32F072_KEIL/Source/Libraries/FT32F0xx_Driver/Src/ft32f0xx_tim.c
26 9 2
KEY_DATA Key_Scan()
in CORTEX_M0_FT32F072_KEIL/Source/Driver/src/board.c
21 9 1
__STATIC_INLINE uint8_t __get_SYSMAPCFGx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/core_rv32.h
14 9 1
__STATIC_INLINE void __set_SYSMAPCFGx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/core_rv32.h
14 9 2
__STATIC_INLINE uint32_t __get_SYSMAPADDRx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/core_rv32.h
14 9 1
__STATIC_INLINE void __set_SYSMAPADDRx()
in RISC-V_RV32_THEAD_SMART_CDS/csi_core/include/core_rv32.h
14 9 2