aws-samples / amazon-location-service-pettracker-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 34 units with 562 lines of code in units (21.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 (62 lines of code)
    • 33 very simple units (500 lines of code)
0% | 0% | 0% | 11% | 88%
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% | 32% | 67%
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cdk/lib/custom-certificate-handler0% | 0% | 0% | 70% | 29%
cdk/lib0% | 0% | 0% | 0% | 100%
cdk/lib/custom-tracker-handler0% | 0% | 0% | 0% | 100%
cdk/lib/position-lambda0% | 0% | 0% | 0% | 100%
web/src/graphql0% | 0% | 0% | 0% | 100%
cdk/lib/tracker-lambda0% | 0% | 0% | 0% | 100%
emulator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handler()
in cdk/lib/custom-certificate-handler/custom-certificate-lambda.py
62 7 2
def handler()
in cdk/lib/custom-tracker-handler/custom-tracker-lambda.py
42 5 2
def on_connection_resumed()
in emulator/pet.py
6 4 4
6 3 1
def send()
in cdk/lib/custom-tracker-handler/cfnresponse.py
26 3 6
constructor()
in cdk/lib/webapp-stack.ts
19 3 3
def send()
in cdk/lib/custom-certificate-handler/cfnresponse.py
26 3 6
constructor()
in cdk/lib/data-ingestion-stack.ts
56 3 3
2 1 3
constructor()
in cdk/lib/pipeline-stack.ts
15 1 3
constructor()
in cdk/lib/pipeline-stack.ts
33 1 3
constructor()
in cdk/lib/pettracker-als-lambda.ts
63 1 3
mutation CreateLocation()
in cdk/lib/position-lambda/graphql/mutations.js
5 1 1
createLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
mutation DeleteLocation()
in cdk/lib/position-lambda/graphql/mutations.js
5 1 1
deleteLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
mutation UpdateLocation()
in cdk/lib/position-lambda/graphql/mutations.js
5 1 1
updateLocation()
in cdk/lib/position-lambda/graphql/mutations.js
7 1 2
query GetLocation()
in cdk/lib/position-lambda/graphql/queries.js
2 1 1
getLocation()
in cdk/lib/position-lambda/graphql/queries.js
7 1 1