aws / aws-nitro-enclaves-cli
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 234 units with 5,228 lines of code in units (31.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (156 lines of code)
    • 4 medium complex units (398 lines of code)
    • 12 simple units (679 lines of code)
    • 217 very simple units (3,995 lines of code)
0% | 2% | 7% | 12% | 76%
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% | 12% | 25% | 22% | 39%
rs0% | 0% | 1% | 9% | 88%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
drivers0% | 12% | 25% | 22% | 39%
src0% | 0% | 2% | 10% | 86%
enclave_build0% | 0% | 0% | 14% | 85%
eif_defs0% | 0% | 0% | 0% | 100%
vsock_proxy0% | 0% | 0% | 0% | 100%
eif_utils0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static long ne_enclave_ioctl()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
156 33 3
static int ne_setup_cpu_pool()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
126 18 1
static int ne_set_user_memory_region_ioctl()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
105 16 2
static int ne_create_vm_ioctl()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
96 14 2
fn allocate()
in src/enclave_proc/resource_manager.rs
71 11 1
static int ne_sanity_check_user_mem_region()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
38 10 2
fn get_credentials()
in enclave_build/src/docker.rs
54 10 1
fn socket_removal_listener()
in src/enclave_proc/socket.rs
40 8 4
fn parse_enclave_cid()
in src/common/commands_parser.rs
54 8 1
int ne_do_request()
in drivers/virt/nitro_enclaves/ne_pci_dev.c
52 8 6
static int ne_pci_probe()
in drivers/virt/nitro_enclaves/ne_pci_dev.c
65 8 2
fn test_connection_listener_run_describe()
in src/enclave_proc/connection_listener.rs
96 7 0
static int ne_start_enclave_ioctl()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
47 7 2
static int ne_enclave_release()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
48 7 2
fn write_eif_to_regions()
in src/enclave_proc/resource_manager.rs
57 6 3
fn test_connection_listener_run_connection_stop()
in src/enclave_proc/connection_listener.rs
84 6 0
static int ne_setup_msix()
in drivers/virt/nitro_enclaves/ne_pci_dev.c
44 6 1
fn enable_credentials_passing()
in src/enclave_proc/connection_listener.rs
30 5 2
fn main()
in src/main.rs
255 5 0
static int ne_set_kernel_param()
in drivers/virt/nitro_enclaves/ne_misc_dev.c
26 5 2