aws / aws-nitro-enclaves-acm
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 237 units with 7,264 lines of code in units (47.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)
    • 2 simple units (67 lines of code)
    • 235 very simple units (7,197 lines of code)
0% | 0% | 0% | <1% | 99%
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
rs0% | 0% | 0% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/vtok_p11/src0% | 0% | 0% | 1% | 98%
src/vtok_agent/src0% | 0% | 0% | 0% | 100%
src/vtok_srv/src0% | 0% | 0% | 0% | 100%
src/vtok_rpc/src0% | 0% | 0% | 0% | 100%
src/vtok_tool/src0% | 0% | 0% | 0% | 100%
src/vtok_common/src0% | 0% | 0% | 0% | 100%
src/vtok_init/src0% | 0% | 0% | 0% | 100%
src/vtok_srv0% | 0% | 0% | 0% | 100%
src/vtok_p110% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn ecdsa_sig_der_to_ckrs()
in src/vtok_p11/src/crypto/mod.rs
35 6 1
fn config_evp_pkey_ctx()
in src/vtok_p11/src/crypto/mod.rs
32 6 2
fn retry_rpc()
in src/vtok_agent/src/enclave.rs
19 5 2
fn read_headers()
in src/vtok_rpc/src/transport.rs
29 4 1
fn validate_token()
in src/vtok_rpc/src/api.rs
15 4 1
fn update_token()
in src/vtok_srv/src/worker.rs
35 4 3
fn bignum_to_vec()
in src/vtok_p11/src/crypto/mod.rs
15 4 1
fn from_file()
in src/vtok_common/src/util/flock.rs
13 4 2
fn validate_token_pin()
in src/vtok_rpc/src/api.rs
9 3 1
fn validate_token_label()
in src/vtok_rpc/src/api.rs
9 3 1
fn reload_nginx()
in src/vtok_agent/src/agent/mod.rs
68 3 2
fn satisfy_target()
in src/vtok_agent/src/agent/mngtok.rs
98 3 1
fn log()
in src/vtok_agent/src/logger.rs
9 3 2
fn run_server()
in src/vtok_srv/src/main.rs
13 3 1
fn remove_token()
in src/vtok_srv/src/worker.rs
19 3 2
fn ecdsa_sig_ckrs_to_der()
in src/vtok_p11/src/crypto/mod.rs
21 3 1
fn sign()
in src/vtok_p11/src/crypto/sign.rs
24 3 2
fn private_key_for_mech()
in src/vtok_p11/src/backend/session.rs
24 3 3
fn public_key_for_mech()
in src/vtok_p11/src/backend/session.rs
24 3 3
fn load_device()
in src/vtok_common/src/config.rs
15 3 1