aws-samples / aws-nitro-enclaves-workshop
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 32 units with 336 lines of code in units (48.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (14 lines of code)
    • 31 very simple units (322 lines of code)
0% | 0% | 0% | 4% | 95%
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
py0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
resources/code/my-first-enclave/secure-local-channel0% | 0% | 0% | 9% | 90%
resources/code/my-first-enclave/cryptographic-attestation0% | 0% | 0% | 0% | 100%
resources/code/my-first-enclave/nitro-enclaves-cli0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def recv_data()
in resources/code/my-first-enclave/secure-local-channel/server.py
14 6 1
def get_s3_ip_by_region()
in resources/code/my-first-enclave/secure-local-channel/server.py
13 4 1
def main()
in resources/code/my-first-enclave/cryptographic-attestation/client.py
26 4 0
def bind()
in resources/code/my-first-enclave/secure-local-channel/server.py
4 3 2
def forward()
in resources/code/my-first-enclave/secure-local-channel/traffic_forwarder.py
12 3 2
def connect()
in resources/code/my-first-enclave/secure-local-channel/client.py
7 3 2
def main()
in resources/code/my-first-enclave/cryptographic-attestation/server.py
21 3 0
def forward()
in resources/code/my-first-enclave/cryptographic-attestation/traffic_forwarder.py
9 3 2
def main()
in resources/code/my-first-enclave/secure-local-channel/server.py
15 2 0
def server()
in resources/code/my-first-enclave/secure-local-channel/traffic_forwarder.py
23 2 4
def main()
in resources/code/my-first-enclave/secure-local-channel/traffic_forwarder.py
14 2 1
def client_handler()
in resources/code/my-first-enclave/secure-local-channel/client.py
6 2 1
def main()
in resources/code/my-first-enclave/secure-local-channel/client.py
17 2 0
def server()
in resources/code/my-first-enclave/cryptographic-attestation/traffic_forwarder.py
23 2 4
def main()
in resources/code/my-first-enclave/cryptographic-attestation/traffic_forwarder.py
14 2 1
def main()
in resources/code/my-first-enclave/nitro-enclaves-cli/server.py
6 2 0
def __init__()
in resources/code/my-first-enclave/secure-local-channel/server.py
2 1 2
def server_handler()
in resources/code/my-first-enclave/secure-local-channel/server.py
5 1 1
def __init__()
in resources/code/my-first-enclave/secure-local-channel/client.py
2 1 2
def send_data()
in resources/code/my-first-enclave/secure-local-channel/client.py
7 1 2