awslabs / logstash-output-amazon_es
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 111 units with 1,142 lines of code in units (45.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (296 lines of code)
    • 14 simple units (318 lines of code)
    • 89 very simple units (528 lines of code)
0% | 0% | 25% | 27% | 46%
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% | 25% | 27% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/logstash/outputs/amazon_es0% | 0% | 38% | 22% | 38%
lib/logstash/outputs/amazon_es/http_client0% | 0% | 5% | 38% | 56%
spec0% | 0% | 0% | 0% | 100%
lib/logstash/outputs0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
self.build
in lib/logstash/outputs/amazon_es/http_client_builder.rb
83 16 3
initialize
in lib/logstash/outputs/amazon_es/http_client/manticore_adapter.rb
24 15 2
self.setup_ssl
in lib/logstash/outputs/amazon_es/http_client_builder.rb
30 15 2
calculate_property
in lib/logstash/outputs/amazon_es/http_client.rb
13 14 4
bulk
in lib/logstash/outputs/amazon_es/http_client.rb
35 12 1
host_to_url
in lib/logstash/outputs/amazon_es/http_client.rb
26 12 1
safe_bulk
in lib/logstash/outputs/amazon_es/common.rb
54 12 1
update_action_builder
in lib/logstash/outputs/amazon_es/http_client.rb
31 11 2
perform_request
in lib/logstash/outputs/amazon_es/http_client/manticore_adapter.rb
31 9 5
event_action_tuple
in lib/logstash/outputs/amazon_es/common.rb
34 9 1
retrying_submit
in lib/logstash/outputs/amazon_es/common.rb
20 9 1
scheme
in lib/logstash/outputs/amazon_es/http_client.rb
15 8 0
build_adapter
in lib/logstash/outputs/amazon_es/http_client.rb
25 8 1
submit
in lib/logstash/outputs/amazon_es/common.rb
36 8 1
healthcheck!
in lib/logstash/outputs/amazon_es/http_client/pool.rb
30 7 0
update_urls
in lib/logstash/outputs/amazon_es/http_client/pool.rb
25 7 1
get_event_type
in lib/logstash/outputs/amazon_es/common.rb
17 7 1
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
sniff_2x_1x
in lib/logstash/outputs/amazon_es/http_client/pool.rb
14 6 1