awslabs / aws-lambda-rust-runtime
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 125 units with 1,430 lines of code in units (48.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (176 lines of code)
    • 1 simple units (34 lines of code)
    • 123 very simple units (1,220 lines of code)
0% | 0% | 12% | 2% | 85%
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% | 12% | 2% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda-http/src0% | 0% | 16% | 3% | 80%
lambda-runtime/src0% | 0% | 0% | 0% | 100%
lambda-runtime-api-client/src0% | 0% | 0% | 0% | 100%
lambda-extension/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn from()
in lambda-http/src/request.rs
176 17 1
fn deserialize_multi_value_headers()
in lambda-http/src/request.rs
34 7 1
fn next()
in lambda-http/src/strmap.rs
22 5 1
fn payload()
in lambda-http/src/ext.rs
23 4 1
fn deserialize_headers()
in lambda-http/src/request.rs
29 3 1
fn serialize_multi_value_headers()
in lambda-http/src/response.rs
14 3 2
fn try_from()
in lambda-runtime/src/types.rs
40 3 1
fn deserialize_method()
in lambda-http/src/request.rs
19 2 1
fn deserializes_apigw_v2_request_events()
in lambda-http/src/request.rs
28 2 0
fn query_string_parameters()
in lambda-http/src/ext.rs
21 2 1
fn serialize_headers()
in lambda-http/src/response.rs
11 2 2
fn serialize_headers_slice()
in lambda-http/src/response.rs
10 2 2
fn into_response()
in lambda-http/src/response.rs
6 2 1
fn call()
in lambda-runtime/src/simulated.rs
8 2 2
fn incoming()
in lambda-runtime/src/lib.rs
16 2 1
fn into_rsp()
in lambda-runtime/src/requests.rs
5 2 1
fn set_origin()
in lambda-runtime-api-client/src/lib.rs
19 1 2
fn test_set_origin()
in lambda-runtime-api-client/src/lib.rs
13 1 0
fn test_set_origin_with_base_path()
in lambda-runtime-api-client/src/lib.rs
24 1 0
fn clone()
in lambda-http/src/strmap.rs
4 1 1