aws-samples / serverless-rust-demo
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 23 units with 312 lines of code in units (21.5% 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)
    • 0 simple units (0 lines of code)
    • 23 very simple units (312 lines of code)
0% | 0% | 0% | 0% | 100%
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% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/entrypoints/lambda/dynamodb0% | 0% | 0% | 0% | 100%
src/store/dynamodb0% | 0% | 0% | 0% | 100%
src/event_bus/eventbridge0% | 0% | 0% | 0% | 100%
src/store0% | 0% | 0% | 0% | 100%
src/entrypoints/lambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
fn get_s()
in src/store/dynamodb/ext.rs
4 2 2
fn to_eventbridge()
in src/event_bus/eventbridge/ext.rs
3 2 2
fn into()
in src/store/memory.rs
7 1 1
fn from()
in src/store/dynamodb/mod.rs
10 1 1
fn try_from()
in src/store/dynamodb/mod.rs
13 1 1
fn get_request_builder()
in src/store/dynamodb/mod.rs
7 1 0
fn product_from_dynamodb()
in src/store/dynamodb/mod.rs
10 1 0
fn product_to_dynamodb()
in src/store/dynamodb/mod.rs
12 1 0
fn get_s()
in src/store/dynamodb/ext.rs
3 1 2
fn get_n()
in src/store/dynamodb/ext.rs
3 1 2
fn attributevalue_get_s()
in src/store/dynamodb/ext.rs
5 1 0
fn attributevalue_get_s_missing()
in src/store/dynamodb/ext.rs
5 1 0
fn attributevalue_get_n()
in src/store/dynamodb/ext.rs
5 1 0
fn attributevalue_get_n_missing()
in src/store/dynamodb/ext.rs
5 1 0
fn response()
in src/entrypoints/lambda/apigateway.rs
7 1 2
fn try_from()
in src/entrypoints/lambda/dynamodb/model.rs
18 1 1
fn try_from()
in src/entrypoints/lambda/dynamodb/model.rs
21 1 1
fn get_ddb_event()
in src/entrypoints/lambda/dynamodb/model.rs
77 1 0
fn test_deserialize()
in src/entrypoints/lambda/dynamodb/model.rs
24 1 0
fn test_dynamodb_into_event()
in src/entrypoints/lambda/dynamodb/model.rs
33 1 0