aws / opsworks-cookbooks
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 154 units with 1,468 lines of code in units (10.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (75 lines of code)
    • 13 simple units (286 lines of code)
    • 137 very simple units (1,107 lines of code)
0% | 0% | 5% | 19% | 75%
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
rb0% | 0% | 5% | 21% | 73%
py0% | 0% | 0% | 0% | 100%
pl0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ebs0% | 0% | 15% | 46% | 38%
opsworks_commons0% | 0% | 8% | 4% | 86%
scm_helper0% | 0% | 0% | 32% | 67%
opsworks_ganglia0% | 0% | 0% | 17% | 82%
rails0% | 0% | 0% | 82% | 17%
s3_file0% | 0% | 0% | 0% | 100%
ssh_users0% | 0% | 0% | 0% | 100%
opsworks_berkshelf0% | 0% | 0% | 0% | 100%
opsworks_ecs0% | 0% | 0% | 0% | 100%
gem_support0% | 0% | 0% | 0% | 100%
ssh_host_keys0% | 0% | 0% | 0% | 100%
apache20% | 0% | 0% | 0% | 100%
opsworks_cloudwatchlogs0% | 0% | 0% | 0% | 100%
opsworks_custom_cookbooks0% | 0% | 0% | 0% | 100%
haproxy0% | 0% | 0% | 0% | 100%
deploy0% | 0% | 0% | 0% | 100%
opsworks_nodejs0% | 0% | 0% | 0% | 100%
opsworks_initial_setup0% | 0% | 0% | 0% | 100%
packages0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
self.lvm_physical_group_exists?
in ebs/libraries/block_device.rb
16 13 1
self.lvm_volume_group_exists?
in ebs/libraries/block_device.rb
16 13 1
self.lvm_volume_exits?
in ebs/libraries/block_device.rb
17 13 1
local_asset
in opsworks_commons/providers/assets_installer.rb
26 12 0
self.existing_raid_at?
in ebs/libraries/block_device.rb
16 10 1
self.assembled_raid_at?
in ebs/libraries/block_device.rb
16 9 1
self.existing_lvm_at?
in ebs/libraries/block_device.rb
16 9 1
self.wait_for_logical_volumes
in ebs/libraries/block_device.rb
33 8 1
self.assemble_raid
in ebs/libraries/block_device.rb
35 8 2
ensure_scm_package_installed
in scm_helper/libraries/package.rb
26 8 1
self.parse_uri
in scm_helper/libraries/s3.rb
32 8 1
self.determine_database_adapter
in rails/libraries/rails_configuration.rb
34 8 4
self.create_lvm
in ebs/libraries/block_device.rb
14 7 2
add_frontend_totals
in opsworks_ganglia/files/default/haproxy.rb
9 7 1
report
in opsworks_ganglia/files/default/haproxy.rb
27 7 0
self.wait_for
in ebs/libraries/block_device.rb
15 6 2
asset_url
in opsworks_commons/providers/assets_installer.rb
13 6 0
next_free_uid
in ssh_users/libraries/user.rb
12 5 1
self.exec_command_with_retries
in ebs/libraries/block_device.rb
14 5 3
self.volume_id
in ebs/libraries/ebs_volume.rb
21 5 1