awslabs / amazon-kinesis-client-ruby
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 39 units with 186 lines of code in units (44.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (25 lines of code)
    • 2 small units (23 lines of code)
    • 36 very small units (138 lines of code)
0% | 0% | 13% | 12% | 74%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 0% | 13% | 12% | 74%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/aws/kclrb0% | 0% | 14% | 6% | 78%
spec0% | 0% | 0% | 70% | 29%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
process_action
in lib/aws/kclrb/kcl_process.rb
25 7 1
process_records
in spec/kcl_process_spec.rb
12 3 2
read_line
in lib/aws/kclrb/io_proxy.rb
11 5 0
initialize
in lib/aws/kclrb/kcl_process.rb
9 2 4
checkpoint
in lib/aws/kclrb/checkpointer.rb
9 4 1
run
in lib/aws/kclrb/kcl_process.rb
7 3 0
write_error
in lib/aws/kclrb/io_proxy.rb
7 2 1
read_action
in lib/aws/kclrb/io_proxy.rb
6 2 0
dispatch_to_processor
in lib/aws/kclrb/kcl_process.rb
5 2 2
initialize
in lib/aws/kclrb/messages.rb
5 1 3
initialize
in lib/aws/kclrb/io_proxy.rb
5 1 3
process_records
in lib/aws/kclrb/record_processor.rb
4 1 1
initialize
in lib/aws/kclrb/messages.rb
4 1 2
write_line
in lib/aws/kclrb/io_proxy.rb
4 1 1
write_action
in lib/aws/kclrb/io_proxy.rb
4 1 2
initialize
in lib/aws/kclrb/checkpointer.rb
3 1 1
to_s
in lib/aws/kclrb/checkpointer.rb
3 1 0
checkpoint
in lib/aws/kclrb/checkpointer.rb
3 1 1
initialize
in lib/aws/kclrb/checkpointer.rb
3 1 1
init_processor
in lib/aws/kclrb/record_processor.rb
3 1 1