aws / aws-codedeploy-agent
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 337 units with 3,303 lines of code in units (61.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (146 lines of code)
    • 36 medium size units (1,034 lines of code)
    • 66 small units (957 lines of code)
    • 233 very small units (1,166 lines of code)
0% | 4% | 31% | 28% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 4% | 31% | 28% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/instance_agent0% | 5% | 33% | 26% | 34%
features/step_definitions0% | 0% | 24% | 43% | 31%
lib/aws0% | 0% | 27% | 34% | 37%
spec/aws0% | 0% | 40% | 59% | 0%
lib0% | 0% | 10% | 26% | 63%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
initialize
in lib/instance_agent/plugins/codedeploy/application_specification/ace_info.rb
81 39 2
initialize
in lib/instance_agent/plugins/codedeploy/deployment_specification.rb
65 23 1
download_from_github
in lib/instance_agent/plugins/codedeploy/command_executor.rb
50 10 6
validate
in lib/aws/codedeploy/local/cli_validator.rb
43 29 1
execute_script
in lib/instance_agent/plugins/codedeploy/hook_executor.rb
38 3 2
unpack_bundle
in lib/instance_agent/plugins/codedeploy/command_executor.rb
38 9 3
initialize
in lib/instance_agent/plugins/codedeploy/application_specification/mode_info.rb
36 6 1
generate_instructions
in lib/instance_agent/plugins/codedeploy/installer.rb
36 10 1
run
in lib/instance_agent/agent/base.rb
34 10 0
stop
in lib/instance_agent/runner/master.rb
34 8 0
self.configure
in lib/instance_agent/plugins/codedeploy/onpremise_config.rb
33 12 0
self.delete_folder
in lib/instance_agent/platform/windows_util.rb
33 6 1
execute
in lib/instance_agent/plugins/codedeploy/hook_executor.rb
32 10 0
download_from_s3
in lib/instance_agent/plugins/codedeploy/command_executor.rb
32 7 5
process_command
in lib/instance_agent/plugins/codedeploy/command_poller.rb
31 3 2
initialize
in lib/instance_agent/plugins/codedeploy/hook_executor.rb
30 10 1
get_range
in lib/instance_agent/plugins/codedeploy/application_specification/range_info.rb
29 9 0
initialize
in lib/instance_agent/config.rb
28 1 0
self.delete_folder
in lib/instance_agent/platform/linux_util.rb
28 5 1
s3_options
in lib/instance_agent/plugins/codedeploy/command_executor.rb
27 6 0