aws-samples / amazon-s3-object-lambda-default-configuration
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 70 units with 654 lines of code in units (59.0% 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)
    • 5 simple units (151 lines of code)
    • 65 very simple units (503 lines of code)
0% | 0% | 0% | 23% | 76%
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
ts0% | 0% | 0% | 36% | 64%
py0% | 0% | 0% | 30% | 69%
java0% | 0% | 0% | 12% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
function/java11/src/main0% | 0% | 0% | 12% | 87%
function/nodejs_14_x/src/response0% | 0% | 0% | 80% | 19%
function/python_3_9/src/handler0% | 0% | 0% | 66% | 34%
function/nodejs_14_x/src/handler0% | 0% | 0% | 40% | 59%
function/python_3_9/src/response0% | 0% | 0% | 26% | 73%
function/nodejs_14_x/src/request0% | 0% | 0% | 0% | 100%
function/nodejs_14_x/src/error0% | 0% | 0% | 0% | 100%
function/python_3_9/src/request0% | 0% | 0% | 0% | 100%
function/python_3_9/src/error0% | 0% | 0% | 0% | 100%
function/nodejs_14_x/src0% | 0% | 0% | 0% | 100%
function/python_3_9/src/checksum0% | 0% | 0% | 0% | 100%
function/nodejs_14_x/src/checksum0% | 0% | 0% | 0% | 100%
function/python_3_9/src0% | 0% | 0% | 0% | 100%
function/python_3_9/src/transform0% | 0% | 0% | 0% | 100%
function/nodejs_14_x/src/transform0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_object_handler()
in function/python_3_9/src/handler/get_object_handler.py
33 10 3
def validate_range_str()
in function/python_3_9/src/response/range_mapper.py
14 10 1
public TransformedObject mapRange()
in function/java11/src/main/java/com/amazon/s3objectlambda/transform/RangeMapper.java
41 9 2
export default function mapRange()
in function/nodejs_14_x/src/response/range_mapper.ts
34 9 2
export default async function handleGetObjectRequest()
in function/nodejs_14_x/src/handler/get_object_handler.ts
29 6 3
def validate_request()
in function/python_3_9/src/request/validator.py
8 5 1
def split_range_str()
in function/python_3_9/src/response/range_mapper.py
8 5 1
public void handleRequest()
in function/java11/src/main/java/com/amazon/s3objectlambda/request/GetObjectHandler.java
27 5 2
def map_part_number()
in function/python_3_9/src/response/part_number_mapper.py
13 4 2
def map_range()
in function/python_3_9/src/response/range_mapper.py
12 4 2
private static String getQueryParam()
in function/java11/src/main/java/com/amazon/s3objectlambda/request/RequestUtil.java
13 4 2
public TransformedObject mapPartNumber()
in function/java11/src/main/java/com/amazon/s3objectlambda/transform/PartNumberMapper.java
22 4 2
public static String getAttributeFromS3ErrorResponse()
in function/java11/src/main/java/com/amazon/s3objectlambda/response/ResponseUtil.java
29 4 2
def get_range()
in function/python_3_9/src/request/utils.py
5 3 1
def get_request_header()
in function/python_3_9/src/handler/get_object_handler.py
8 3 1
def apply_range_or_part_number()
in function/python_3_9/src/handler/get_object_handler.py
9 3 2
public static Optional validateUserRequest()
in function/java11/src/main/java/com/amazon/s3objectlambda/request/RequestValidator.java
8 3 1
private HttpResponse getS3ObjectResponse()
in function/java11/src/main/java/com/amazon/s3objectlambda/request/GetObjectHandler.java
22 3 2
public static TransformedObject applyRangeOrPartNumber()
in function/java11/src/main/java/com/amazon/s3objectlambda/transform/ResponseTransformer.java
15 3 2
export default function validate()
in function/nodejs_14_x/src/request/validator.ts
8 3 1