aws / aws-codedeploy-agent
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 337 units with 3,303 lines of code in units (61.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (124 lines of code)
    • 2 medium complex units (98 lines of code)
    • 34 simple units (804 lines of code)
    • 299 very simple units (2,277 lines of code)
0% | 3% | 2% | 24% | 68%
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% | 3% | 2% | 24% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/instance_agent0% | 3% | 3% | 26% | 66%
lib/aws0% | 18% | 0% | 21% | 60%
lib0% | 0% | 0% | 19% | 80%
spec/aws0% | 0% | 0% | 40% | 59%
features/step_definitions0% | 0% | 0% | 5% | 94%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
initialize
in lib/instance_agent/plugins/codedeploy/application_specification/ace_info.rb
81 39 2
validate
in lib/aws/codedeploy/local/cli_validator.rb
43 29 1
initialize
in lib/instance_agent/plugins/codedeploy/deployment_specification.rb
65 23 1
self.configure
in lib/instance_agent/plugins/codedeploy/onpremise_config.rb
33 12 0
run
in lib/instance_agent/agent/base.rb
34 10 0
initialize
in lib/instance_agent/plugins/codedeploy/hook_executor.rb
30 10 1
execute
in lib/instance_agent/plugins/codedeploy/hook_executor.rb
32 10 0
download_from_github
in lib/instance_agent/plugins/codedeploy/command_executor.rb
50 10 6
generate_instructions
in lib/instance_agent/plugins/codedeploy/installer.rb
36 10 1
with_error_handling
in lib/winagent.rb
18 10 0
get_full_acl
in lib/instance_agent/plugins/codedeploy/install_instruction.rb
24 9 1
unpack_bundle
in lib/instance_agent/plugins/codedeploy/command_executor.rb
38 9 3
get_range
in lib/instance_agent/plugins/codedeploy/application_specification/range_info.rb
29 9 0
revision
in lib/aws/codedeploy/local/deployer.rb
12 8 2
self.parse_install_commands
in lib/instance_agent/plugins/codedeploy/install_instruction.rb
26 8 1
set_permissions
in lib/instance_agent/plugins/codedeploy/install_instruction.rb
22 8 2
find_matches
in lib/instance_agent/plugins/codedeploy/install_instruction.rb
24 8 1
execute
in lib/instance_agent/plugins/codedeploy/install_instruction.rb
20 8 1
stop
in lib/instance_agent/runner/master.rb
34 8 0
with_error_handling
in lib/instance_agent/runner/child.rb
15 8 0