awslabs / logstash-output-amazon_es
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 111 units with 1,142 lines of code in units (45.6% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (137 lines of code)
    • 12 medium size units (357 lines of code)
    • 20 small units (307 lines of code)
    • 77 very small units (341 lines of code)
0% | 11% | 31% | 26% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 11% | 31% | 26% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/logstash/outputs/amazon_es0% | 19% | 35% | 21% | 23%
lib/logstash/outputs/amazon_es/http_client0% | 0% | 26% | 37% | 36%
spec0% | 0% | 0% | 0% | 100%
lib/logstash/outputs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
self.build
in lib/logstash/outputs/amazon_es/http_client_builder.rb
83 16 3
safe_bulk
in lib/logstash/outputs/amazon_es/common.rb
54 12 1
submit
in lib/logstash/outputs/amazon_es/common.rb
36 8 1
bulk
in lib/logstash/outputs/amazon_es/http_client.rb
35 12 1
event_action_tuple
in lib/logstash/outputs/amazon_es/common.rb
34 9 1
perform_request
in lib/logstash/outputs/amazon_es/http_client/manticore_adapter.rb
31 9 5
update_action_builder
in lib/logstash/outputs/amazon_es/http_client.rb
31 11 2
healthcheck!
in lib/logstash/outputs/amazon_es/http_client/pool.rb
30 7 0
self.included
in lib/logstash/outputs/amazon_es/common_configs.rb
30 2 1
self.setup_ssl
in lib/logstash/outputs/amazon_es/http_client_builder.rb
30 15 2
host_to_url
in lib/logstash/outputs/amazon_es/http_client.rb
26 12 1
update_urls
in lib/logstash/outputs/amazon_es/http_client/pool.rb
25 7 1
build_adapter
in lib/logstash/outputs/amazon_es/http_client.rb
25 8 1
initialize
in lib/logstash/outputs/amazon_es/http_client/manticore_adapter.rb
24 15 2
initialize
in lib/logstash/outputs/amazon_es/http_client/pool.rb
20 2 4
until_stopped
in lib/logstash/outputs/amazon_es/http_client/pool.rb
20 6 2
check_sniff
in lib/logstash/outputs/amazon_es/http_client/pool.rb
20 6 0
get_connection
in lib/logstash/outputs/amazon_es/http_client/pool.rb
20 6 0
retrying_submit
in lib/logstash/outputs/amazon_es/common.rb
20 9 1
build_pool
in lib/logstash/outputs/amazon_es/http_client.rb
19 2 1