freertos / Lab-Project-FreeRTOS-MCUBoot
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 33 units with 496 lines of code in units (17.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (157 lines of code)
    • 1 simple units (39 lines of code)
    • 31 very simple units (300 lines of code)
0% | 0% | 31% | 7% | 60%
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% | 0% | 31% | 7% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
proj/espressif/esp32/app/main0% | 0% | 48% | 12% | 39%
port/espressif/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
IRAM_ATTR static void start_cpu()
in proj/espressif/esp32/app/main/start.c
157 16 1
static void start_other_core()
in proj/espressif/esp32/app/main/start.c
39 6 1
static uint32_t readline()
in port/espressif/src/boot_serial_port.c
22 5 2
uint16_t crc16_port_ccitt()
in port/espressif/src/crc16_port.c
14 4 3
int base64_port_encode()
in port/espressif/src/base64_port.c
9 2 5
int base64_port_decode()
in port/espressif/src/base64_port.c
9 2 5
bool boot_port_serial_detect_boot_pin()
in port/espressif/src/boot_serial_port.c
11 2 1
static int boot_port_serial_read()
in port/espressif/src/boot_serial_port.c
7 2 3
static void boot_port_serial_write()
in port/espressif/src/boot_serial_port.c
10 2 2
void boot_port_startup()
in port/espressif/src/boot_startup_port.c
7 2 1
bool bReadImageHeader()
in proj/espressif/esp32/app/main/main.c
11 2 1
void app_main()
in proj/espressif/esp32/app/main/main.c
15 2 1
void IRAM_ATTR call_start_cpu1()
in proj/espressif/esp32/app/main/start.c
33 2 1
static void intr_matrix_clear()
in proj/espressif/esp32/app/main/start.c
9 2 1
IRAM_ATTR static int map_rom_segments()
in proj/espressif/esp32/app/main/start.c
38 2 1
IRAM_ATTR void __start()
in proj/espressif/esp32/app/main/start.c
8 2 1
void boot_port_heap_init()
in port/espressif/src/boot_heap_port.c
7 1 1
void boot_port_free()
in port/espressif/src/boot_heap_port.c
3 1 1
uint16_t system_port_ntohs()
in port/espressif/src/system_port.c
4 1 1
uint16_t system_port_htons()
in port/espressif/src/system_port.c
4 1 1