aws-samples / aws-media-asset-preparation-system
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 1,447 units with 21,906 lines of code in units (64.6% of code).
    • 1 very complex units (336 lines of code)
    • 2 complex units (145 lines of code)
    • 47 medium complex units (2,344 lines of code)
    • 141 simple units (3,071 lines of code)
    • 1,256 very simple units (16,010 lines of code)
1% | <1% | 10% | 14% | 73%
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
js12% | 0% | 21% | 18% | 46%
py0% | <1% | 9% | 13% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
public28% | 0% | 39% | 22% | 10%
amplify/backend/function0% | <1% | 9% | 13% | 76%
src/components/Cards0% | 0% | 78% | 0% | 21%
src/components/View0% | 0% | 0% | 36% | 63%
src/components/Table0% | 0% | 0% | 53% | 46%
src/components/Utilities0% | 0% | 0% | 0% | 100%
src/graphql0% | 0% | 0% | 0% | 100%
src/components/UtilityPages0% | 0% | 0% | 0% | 100%
src/store/user0% | 0% | 0% | 0% | 100%
src/store/mapsconfig0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/components/Main0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function ViewController()
in public/explorer.js
336 53 2
def parse_url()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/urllib3/util/url.py
53 26 1
def send()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/requests/adapters.py
92 26 7
def valid_contexto()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/core.py
32 23 3
def build_digest_header()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/requests/auth.py
80 23 3
function TrashController()
in public/explorer.js
137 23 2
def print_()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/urllib3/packages/six.py
52 22 2
def feed()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/chardet/universaldetector.py
66 22 2
def check_bidi()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/core.py
44 21 2
def resolve_redirects()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/requests/sessions.py
66 21 10
function UploadController()
in public/explorer.js
162 21 2
def match_hostname()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/urllib3/packages/ssl_match_hostname/_implementation.py
47 20 2
def parse()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/pymediainfo/__init__.py
52 20 11
def prepare_url()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/requests/models.py
55 20 3
def uts46_remap()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/idna/core.py
25 18 3
def insert_on()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py
38 18 4
def connect()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/urllib3/connection.py
73 17 1
def resolve()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/pkg_resources/__init__.py
43 17 6
def _read_callback()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/urllib3/contrib/securetransport.py
41 16 3
def guess_json_utf()
in amplify/backend/function/MAPSMediaInfoLambdaLayer/opt/python/lib/python3.7/site-packages/requests/utils.py
22 16 1