microsoft / edx-configuration
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 262 units with 3,777 lines of code in units (5.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (87 lines of code)
    • 22 medium complex units (941 lines of code)
    • 39 simple units (893 lines of code)
    • 200 very simple units (1,856 lines of code)
0% | 2% | 24% | 23% | 49%
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% | 26% | 24% | 46%
c0% | 0% | 0% | 0% | 100%
groovy0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
util/vpc-tools0% | 10% | 23% | 17% | 48%
playbooks/edx-east0% | 0% | 25% | 24% | 49%
playbooks0% | 0% | 43% | 20% | 36%
docker/plays0% | 0% | 25% | 27% | 47%
playbooks/library0% | 0% | 39% | 26% | 33%
playbooks/callback_plugins0% | 0% | 15% | 26% | 57%
util0% | 0% | 28% | 20% | 50%
playbooks/continuous_delivery0% | 0% | 0% | 29% | 70%
playbooks/roles0% | 0% | 0% | 29% | 70%
util/jenkins0% | 0% | 0% | 46% | 53%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def poll_sqs_ansible()
in util/vpc-tools/abbey.py
87 26 0
def _ssh_config()
in util/vpc-tools/vpc-tools.py
114 21 1
def _map_plays_to_roles()
in util/parsefiles.py
15 20 6
def _send_queue_message()
in playbooks/callback_plugins/sqs.py
29 19 3
def _send_queue_message()
in playbooks/edx-east/callback_plugins/sqs.py
29 19 3
def _map_roles_to_roles()
in util/parsefiles.py
15 19 6
def run()
in playbooks/active_instances_in_asg.py
28 18 2
def create_image()
in docker/plays/library/ec2_ami_2_0_0_1.py
65 14 2
def update_image()
in docker/plays/library/ec2_ami_2_0_0_1.py
22 14 2
def get_host_info()
in playbooks/ec2.py
45 14 1
def get_host_info()
in playbooks/edx-east/ec2.py
45 14 1
def create_image()
in playbooks/edx-east/library/ec2_ami_2_0_0_1.py
65 14 2
def update_image()
in playbooks/edx-east/library/ec2_ami_2_0_0_1.py
22 14 2
def create_image()
in playbooks/library/ec2_ami_2_0_0_1.py
65 14 2
def update_image()
in playbooks/library/ec2_ami_2_0_0_1.py
22 14 2
def read_settings()
in playbooks/ec2.py
50 13 1
def read_settings()
in playbooks/edx-east/ec2.py
50 13 1
def launch_and_configure()
in util/vpc-tools/abbey.py
84 13 1
def playbook_on_stats()
in playbooks/callback_plugins/hipchat_plugin.py
34 11 2
def add_instance()
in playbooks/ec2.py
46 11 3