aws / aws-sdk-rails
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 108 units with 899 lines of code in units (44.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (68 lines of code)
    • 6 medium size units (156 lines of code)
    • 22 small units (313 lines of code)
    • 79 very small units (362 lines of code)
0% | 7% | 17% | 34% | 40%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 100% | 0% | 0% | 0%
rb0% | 0% | 18% | 37% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sample_app0% | 100% | 0% | 0% | 0%
lib/generators0% | 0% | 32% | 35% | 32%
lib/aws0% | 0% | 7% | 40% | 51%
sample_app/db0% | 0% | 57% | 0% | 42%
lib/active_job0% | 0% | 0% | 83% | 16%
sample_app/app0% | 0% | 0% | 34% | 65%
lib/action_dispatch0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
module.exports = function()
in sample_app/babel.config.js
68 6 1
ensure_hkey
in lib/generators/aws_record/base.rb
30 8 0
poll
in lib/aws/rails/sqs_active_job/poller.rb
27 3 0
change
in sample_app/db/migrate/20201210211818_create_active_storage_tables.active_storage.rb
27 1 0
parse_type
in lib/generators/aws_record/generated_attribute.rb
26 12 2
parse_gsis!
in lib/generators/aws_record/base.rb
24 8 0
ensure_unique_fields
in lib/generators/aws_record/base.rb
22 5 0
parse_args
in lib/aws/rails/sqs_active_job/poller.rb
19 2 1
parse_option
in lib/generators/aws_record/generated_attribute.rb
18 8 2
parse_attributes!
in lib/generators/aws_record/base.rb
18 5 0
run
in lib/aws/rails/sqs_active_job/poller.rb
17 3 0
initialize
in lib/generators/aws_record/secondary_index.rb
17 8 2
initialize
in lib/generators/aws_record/base.rb
17 5 2
parse_table_config!
in lib/generators/aws_record/base.rb
17 5 0
execute
in lib/aws/rails/sqs_active_job/executor.rb
16 3 1
self.to_sqs_msg
in lib/aws/rails/sqs_active_job/lambda_handler.rb
15 1 1
_enqueue
in lib/active_job/queue_adapters/amazon_sqs_adapter.rb
15 2 2
_enqueue
in lib/active_job/queue_adapters/amazon_sqs_async_adapter.rb
14 3 2
execute_job
in lib/aws/rails/middleware/ebs_sqs_active_job_middleware.rb
13 2 1
execute_periodic_task
in lib/aws/rails/middleware/ebs_sqs_active_job_middleware.rb
13 2 1