awslabs / aws-greengrass-group-setup
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 63 units with 1,090 lines of code in units (91.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (41 lines of code)
    • 9 simple units (380 lines of code)
    • 53 very simple units (669 lines of code)
0% | 0% | 3% | 34% | 61%
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% | 3% | 34% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gg_group_setup0% | 0% | 3% | 34% | 61%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def update()
in gg_group_setup/group.py
41 18 2
def _create_function_definition()
in gg_group_setup/cmd.py
67 8 4
def create_devices()
in gg_group_setup/cmd.py
38 8 9
def is_device_fresh()
in gg_group_setup/group.py
11 7 1
def _delete_group()
in gg_group_setup/cmd.py
45 7 3
def create_and_attach_thing_policy()
in gg_group_setup/group.py
42 6 1
def create()
in gg_group_setup/cmd.py
75 6 6
def _create_attach_thing_policy()
in gg_group_setup/cmd.py
26 6 4
def create_thing()
in gg_group_setup/cmd.py
56 6 5
def handler()
in gg_group_setup/mock_device.py
20 6 2
def get_config()
in gg_group_setup/group.py
11 4 1
def is_fresh()
in gg_group_setup/group.py
10 4 1
def _create_device_definition()
in gg_group_setup/cmd.py
26 4 4
def clean_devices()
in gg_group_setup/cmd.py
18 4 4
def create_core()
in gg_group_setup/cmd.py
33 4 8
def associate_devices()
in gg_group_setup/cmd.py
24 4 5
def get_pub_frequency()
in gg_group_setup/mock_device.py
6 4 1
def get_error_topic()
in gg_group_setup/mock_device.py
6 4 1
def get_pub_topic()
in gg_group_setup/mock_device.py
6 4 1
def run_mock()
in gg_group_setup/mock_device.py
8 4 0