opensearch-project / logstash-output-opensearch
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 171 units with 1,424 lines of code in units (31.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (128 lines of code)
    • 9 medium size units (280 lines of code)
    • 32 small units (458 lines of code)
    • 128 very small units (558 lines of code)
0% | 8% | 19% | 32% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 8% | 19% | 32% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/logstash/outputs/opensearch0% | 13% | 15% | 34% | 35%
lib/logstash/plugin_mixins/opensearch0% | 0% | 45% | 15% | 38%
lib/logstash/outputs0% | 0% | 28% | 32% | 39%
spec0% | 0% | 0% | 33% | 66%
spec/integration/outputs0% | 0% | 0% | 56% | 43%
spec/unit/outputs0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
self.build
in lib/logstash/outputs/opensearch/http_client_builder.rb
77 17 3
bulk
in lib/logstash/outputs/opensearch/http_client.rb
51 16 1
safe_bulk
in lib/logstash/plugin_mixins/opensearch/common.rb
45 14 1
submit
in lib/logstash/plugin_mixins/opensearch/common.rb
42 9 1
self.setup_ssl
in lib/logstash/outputs/opensearch/http_client_builder.rb
40 21 2
update_action_builder
in lib/logstash/outputs/opensearch/http_client.rb
32 11 2
perform_request
in lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb
27 10 5
host_to_url
in lib/logstash/outputs/opensearch/http_client.rb
26 12 1
update_urls
in lib/logstash/outputs/opensearch/http_client/pool.rb
23 7 1
event_action_tuple
in lib/logstash/outputs/opensearch.rb
23 10 1
register
in lib/logstash/outputs/opensearch.rb
22 2 0
initialize
in lib/logstash/outputs/opensearch/http_client/pool.rb
20 2 4
until_stopped
in lib/logstash/outputs/opensearch/http_client/pool.rb
20 6 2
get_connection
in lib/logstash/outputs/opensearch/http_client/pool.rb
20 6 0
build_adapter
in lib/logstash/outputs/opensearch/http_client.rb
20 8 1
initialize
in lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb
18 8 2
build_pool
in lib/logstash/outputs/opensearch/http_client.rb
18 2 1
retrying_submit
in lib/logstash/plugin_mixins/opensearch/common.rb
17 9 1
bulk_send
in lib/logstash/outputs/opensearch/http_client.rb
17 3 2
healthcheck!
in lib/logstash/outputs/opensearch/http_client/pool.rb
16 2 0