aws-samples / faropt
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 3,331 units with 36,275 lines of code in units (82.9% of code).
    • 2 very complex units (370 lines of code)
    • 10 complex units (786 lines of code)
    • 171 medium complex units (7,563 lines of code)
    • 354 simple units (7,429 lines of code)
    • 2,794 very simple units (20,127 lines of code)
1% | 2% | 20% | 20% | 55%
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
py1% | 2% | 20% | 20% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib641% | 2% | 21% | 20% | 54%
lib1% | 2% | 21% | 20% | 54%
sdk0% | 0% | 8% | 19% | 71%
faropt0% | 0% | 0% | 100% | 0%
lambda30% | 0% | 0% | 100% | 0%
lambda20% | 0% | 0% | 0% | 100%
lambda0% | 0% | 0% | 0% | 100%
Dockerstuff0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def move_wheel_files()
in lib64/python3.6/dist-packages/pip/_internal/wheel.py
185 56 11
def move_wheel_files()
in lib/python3.6/dist-packages/pip/_internal/wheel.py
185 56 11
def autocomplete()
in lib64/python3.6/dist-packages/pip/_internal/cli/autocompletion.py
66 46 0
def autocomplete()
in lib/python3.6/dist-packages/pip/_internal/cli/autocompletion.py
66 46 0
def from_dist()
in lib64/python3.6/dist-packages/pip/_internal/req/req_uninstall.py
101 35 2
def build()
in lib64/python3.6/dist-packages/pip/_internal/wheel.py
98 35 4
def from_dist()
in lib/python3.6/dist-packages/pip/_internal/req/req_uninstall.py
101 35 2
def build()
in lib/python3.6/dist-packages/pip/_internal/wheel.py
98 35 4
def process_line()
in lib64/python3.6/dist-packages/pip/_internal/req/req_file.py
73 31 9
def process_line()
in lib/python3.6/dist-packages/pip/_internal/req/req_file.py
73 31 9
def process_template_line()
in lib64/python3.6/dist-packages/setuptools/command/egg_info.py
55 28 2
def process_template_line()
in lib/python3.6/dist-packages/setuptools/command/egg_info.py
55 28 2
def search_packages_info()
in lib64/python3.6/dist-packages/pip/_internal/commands/show.py
51 25 1
def search_packages_info()
in lib/python3.6/dist-packages/pip/_internal/commands/show.py
51 25 1
def run()
in lib64/python3.6/dist-packages/pip/_internal/commands/install.py
174 23 3
def run()
in lib/python3.6/dist-packages/pip/_internal/commands/install.py
174 23 3
def upload_file()
in lib64/python3.6/dist-packages/setuptools/command/upload.py
98 22 4
def upload_file()
in lib/python3.6/dist-packages/setuptools/command/upload.py
98 22 4
def egg_info_path()
in lib64/python3.6/dist-packages/pip/_internal/req/req_install.py
40 21 1
def _download_url()
in lib64/python3.6/dist-packages/pip/_internal/download.py
60 21 5