awslabs / amazon-athena-cross-account-catalog
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 4,140 units with 38,087 lines of code in units (90.6% of code).
    • 0 very complex units (0 lines of code)
    • 12 complex units (889 lines of code)
    • 281 medium complex units (9,551 lines of code)
    • 547 simple units (11,916 lines of code)
    • 3,300 very simple units (15,731 lines of code)
0% | 2% | 25% | 31% | 41%
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% | 2% | 25% | 31% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
heracles/hive/hive_metastore0% | 2% | 26% | 31% | 39%
heracles/hive/fb3030% | 0% | 3% | 26% | 70%
heracles/handlers0% | 0% | 0% | 12% | 87%
heracles/clients0% | 0% | 0% | 15% | 84%
heracles0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def read()
in heracles/hive/hive_metastore/ttypes.py
102 46 2
def read()
in heracles/hive/hive_metastore/ttypes.py
93 44 2
def read()
in heracles/hive/hive_metastore/ttypes.py
83 42 2
def read()
in heracles/hive/hive_metastore/ttypes.py
98 40 2
def read()
in heracles/hive/hive_metastore/ttypes.py
78 40 2
def read()
in heracles/hive/hive_metastore/ttypes.py
70 34 2
def read()
in heracles/hive/hive_metastore/ttypes.py
66 29 2
def write()
in heracles/hive/hive_metastore/ttypes.py
74 28 2
def read()
in heracles/hive/hive_metastore/ttypes.py
58 28 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 27 2
def read()
in heracles/hive/hive_metastore/ttypes.py
59 27 2
def read()
in heracles/hive/hive_metastore/ttypes.py
53 26 2
def read()
in heracles/hive/hive_metastore/ThriftHiveMetastore.py
53 25 2
def write()
in heracles/hive/hive_metastore/ttypes.py
63 25 2
def write()
in heracles/hive/hive_metastore/ttypes.py
68 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
53 25 2
def write()
in heracles/hive/hive_metastore/ttypes.py
71 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
49 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
48 25 2
def read()
in heracles/hive/hive_metastore/ttypes.py
55 24 2