aws / aws-sdk-rails
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 108 units with 899 lines of code in units (44.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (26 lines of code)
    • 5 simple units (157 lines of code)
    • 102 very simple units (716 lines of code)
0% | 0% | 2% | 17% | 79%
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% | 3% | 10% | 86%
js0% | 0% | 0% | 100% | 0%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/generators0% | 0% | 8% | 28% | 63%
sample_app0% | 0% | 0% | 100% | 0%
lib/aws0% | 0% | 0% | 0% | 100%
sample_app/app0% | 0% | 0% | 0% | 100%
lib/active_job0% | 0% | 0% | 0% | 100%
sample_app/db0% | 0% | 0% | 0% | 100%
lib/action_dispatch0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
parse_type
in lib/generators/aws_record/generated_attribute.rb
26 12 2
initialize
in lib/generators/aws_record/secondary_index.rb
17 8 2
parse_option
in lib/generators/aws_record/generated_attribute.rb
18 8 2
ensure_hkey
in lib/generators/aws_record/base.rb
30 8 0
parse_gsis!
in lib/generators/aws_record/base.rb
24 8 0
module.exports = function()
in sample_app/babel.config.js
68 6 1
set_environment
in lib/aws/rails/sqs_active_job/poller.rb
3 5 0
get_option_value
in lib/generators/aws_record/secondary_index.rb
12 5 1
field_type
in lib/generators/aws_record/generated_attribute.rb
9 5 0
validate_opt_combs
in lib/generators/aws_record/generated_attribute.rb
8 5 3
initialize
in lib/generators/aws_record/base.rb
17 5 2
parse_attributes!
in lib/generators/aws_record/base.rb
18 5 0
ensure_unique_fields
in lib/generators/aws_record/base.rb
22 5 0
parse_table_config!
in lib/generators/aws_record/base.rb
17 5 0
self.instrument_sdk_operations
in lib/aws/rails/railtie.rb
9 4 0
call
in lib/aws/rails/middleware/ebs_sqs_active_job_middleware.rb
10 4 1
initialize
in lib/action_dispatch/session/dynamodb_store.rb
5 4 2
parse
in lib/generators/aws_record/generated_attribute.rb
9 4 1
self.add_sqsd_middleware
in lib/aws/rails/railtie.rb
9 3 1
run
in lib/aws/rails/sqs_active_job/poller.rb
17 3 0