opensearch-project / logstash-output-opensearch
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 171 units with 1,424 lines of code in units (31.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (284 lines of code)
    • 11 simple units (237 lines of code)
    • 153 very simple units (903 lines of code)
0% | 0% | 19% | 16% | 63%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
rb0% | 0% | 19% | 16% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/logstash/outputs/opensearch0% | 0% | 25% | 16% | 57%
lib/logstash/plugin_mixins/opensearch0% | 0% | 23% | 31% | 45%
lib/logstash/outputs0% | 0% | 0% | 14% | 85%
spec0% | 0% | 0% | 0% | 100%
spec/integration/outputs0% | 0% | 0% | 0% | 100%
spec/unit/outputs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
self.setup_ssl
in lib/logstash/outputs/opensearch/http_client_builder.rb
40 21 2
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
calculate_property
in lib/logstash/outputs/opensearch/http_client.rb
13 14 4
host_to_url
in lib/logstash/outputs/opensearch/http_client.rb
26 12 1
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
event_action_tuple
in lib/logstash/outputs/opensearch.rb
23 10 1
retrying_submit
in lib/logstash/plugin_mixins/opensearch/common.rb
17 9 1
submit
in lib/logstash/plugin_mixins/opensearch/common.rb
42 9 1
initialize
in lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb
18 8 2
aws_iam_auth_initialization
in lib/logstash/outputs/opensearch/http_client/manticore_adapter.rb
12 8 1
scheme
in lib/logstash/outputs/opensearch/http_client.rb
15 8 0
build_adapter
in lib/logstash/outputs/opensearch/http_client.rb
20 8 1
update_urls
in lib/logstash/outputs/opensearch/http_client/pool.rb
23 7 1
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
after_successful_connection
in lib/logstash/plugin_mixins/opensearch/common.rb
10 5 1
wait_for_successful_connection
in lib/logstash/outputs/opensearch.rb
12 5 0