aws / aws-nitro-enclaves-nsm-api
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 17 units with 371 lines of code in units (41.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (150 lines of code)
    • 1 simple units (42 lines of code)
    • 14 very simple units (179 lines of code)
0% | 0% | 40% | 11% | 48%
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
cc0% | 0% | 49% | 13% | 36%
rs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
nsm-test/src0% | 0% | 49% | 13% | 36%
nsm-io/src0% | 0% | 0% | 0% | 100%
nsm-driver/src0% | 0% | 0% | 0% | 100%
nsm-lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 17 most complex units
Unit# linesMcCabe index# params
void check_pcr_locks()
in nsm-test/src/main.cc
97 22 2
void check_initial_pcrs()
in nsm-test/src/main.cc
53 15 2
void get_nsm_description()
in nsm-test/src/main.cc
42 9 2
void check_random()
in nsm-test/src/main.cc
22 5 1
size_t get_pcr_len()
in nsm-test/src/main.cc
15 4 1
void check_single_attestation()
in nsm-test/src/main.cc
21 3 7
void get_pcr_description()
in nsm-test/src/main.cc
17 3 4
int main()
in nsm-test/src/main.cc
21 2 1
void check_attestation()
in nsm-test/src/main.cc
13 1 1
fn main()
in nsm-lib/build.rs
12 1 0
fn output_dir()
in nsm-lib/build.rs
6 1 0
fn nsm_encode_request_to_cbor()
in nsm-driver/src/lib.rs
3 1 1
fn nsm_decode_response_from_cbor()
in nsm-driver/src/lib.rs
6 1 1
fn nsm_ioctl()
in nsm-driver/src/lib.rs
15 1 2
fn from()
in nsm-io/src/lib.rs
3 1 1
fn from()
in nsm-io/src/lib.rs
3 1 1
22 1 0